Sonar fixes

- printStackTrace in test mail server
- Illegal throws
- Large anon. classes

* - indexOf char
- stored external object

* - ignored exceptional return values

* - checkstyle
This commit is contained in:
Gary Russell
2019-04-30 13:57:13 -04:00
committed by Artem Bilan
parent 4199ff57cd
commit 0bb901b286
19 changed files with 280 additions and 235 deletions

View File

@@ -141,8 +141,8 @@ public class RedisChannelPriorityMessageStore extends RedisChannelMessageStore
for (Object key : keys) {
Assert.isInstanceOf(String.class, key);
String keyString = (String) key;
int lastIndexOfColon = keyString.lastIndexOf(":");
if (keyString.indexOf(":") != lastIndexOfColon) {
int lastIndexOfColon = keyString.lastIndexOf(':');
if (keyString.indexOf(':') != lastIndexOfColon) {
narrowedKeys.add(keyString.substring(0, lastIndexOfColon));
}
else {