apply intellij fixes

This commit is contained in:
Athou
2023-12-27 08:52:24 +01:00
parent 1b4b3ca52c
commit 9cd1cde571
43 changed files with 151 additions and 190 deletions

View File

@@ -41,7 +41,7 @@ public class FeedEntryFilteringService {
// classloader that prevents object creation
ClassLoader cl = new ClassLoader() {
@Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
protected Class<?> loadClass(String name, boolean resolve) {
return null;
}
};
@@ -76,7 +76,7 @@ public class FeedEntryFilteringService {
return true;
}
Script script = null;
Script script;
try {
script = ENGINE.createScript(filter);
} catch (JexlException e) {
@@ -95,7 +95,7 @@ public class FeedEntryFilteringService {
Callable<Object> callable = script.callable(context);
Future<Object> future = executor.submit(callable);
Object result = null;
Object result;
try {
result = future.get(500, TimeUnit.MILLISECONDS);
} catch (InterruptedException e) {

View File

@@ -33,8 +33,8 @@ public class FeedEntryTagService {
List<FeedEntryTag> addList = tagNames.stream()
.filter(name -> !existingTagNames.contains(name))
.map(name -> new FeedEntryTag(user, entry, name))
.collect(Collectors.toList());
List<FeedEntryTag> removeList = existingTags.stream().filter(tag -> !tagNames.contains(tag.getName())).collect(Collectors.toList());
.toList();
List<FeedEntryTag> removeList = existingTags.stream().filter(tag -> !tagNames.contains(tag.getName())).toList();
feedEntryTagDAO.saveOrUpdate(addList);
feedEntryTagDAO.delete(removeList);