addressed some sonar issues

This commit is contained in:
Sheldan
2020-05-27 18:41:31 +02:00
parent f05f088d58
commit 175a92408c
31 changed files with 125 additions and 95 deletions

View File

@@ -21,6 +21,6 @@ public class FeatureListener {
@EventListener
public void handleContextRefreshEvent(ContextRefreshedEvent ctxStartEvt) {
// Do nothing yet, because of a race condition between features and commands
}
}

View File

@@ -177,9 +177,4 @@ public class BotServiceBean implements BotService {
}
return null;
}
@Override
public void shutdown() {
}
}

View File

@@ -154,6 +154,7 @@ public class MessageCacheBean implements MessageCache {
reactions.add(cachedReaction);
} catch (InterruptedException | ExecutionException e) {
log.error("Error while executing future to retrieve reaction.", e);
Thread.currentThread().interrupt();
}
});
return reactions;

View File

@@ -42,7 +42,8 @@ public class ChannelManagementServiceBean implements ChannelManagementService {
.build();
return repository.save(build);
} else {
return loadChannel(id).get();
Optional<AChannel> channelOptional = loadChannel(id);
return channelOptional.orElse(null);
}
}