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

@@ -53,7 +53,8 @@ public final class ChannelSecurityInterceptor extends AbstractSecurityIntercepto
}
public Object invoke(MethodInvocation invocation) throws Throwable {
@Override
public Object invoke(MethodInvocation invocation) throws Throwable { // NOSONAR
Method method = invocation.getMethod();
if (method.getName().equals("send") || method.getName().equals("receive")) {
return this.invokeWithAuthorizationCheck(invocation);
@@ -61,7 +62,7 @@ public final class ChannelSecurityInterceptor extends AbstractSecurityIntercepto
return invocation.proceed();
}
private Object invokeWithAuthorizationCheck(MethodInvocation methodInvocation) throws Throwable {
private Object invokeWithAuthorizationCheck(MethodInvocation methodInvocation) throws Throwable { // NOSONAR
Object returnValue = null;
InterceptorStatusToken token = super.beforeInvocation(new ChannelInvocation(methodInvocation));
try {