Sonar fixes
This commit is contained in:
@@ -352,7 +352,7 @@ public class KafkaListenerAnnotationBeanPostProcessor<K, V>
|
||||
Method defaultMethod = null;
|
||||
for (Method method : multiMethods) {
|
||||
Method checked = checkProxy(method, bean);
|
||||
if (AnnotationUtils.findAnnotation(method, KafkaHandler.class).isDefault()) {
|
||||
if (AnnotationUtils.findAnnotation(method, KafkaHandler.class).isDefault()) { // NOSONAR never null
|
||||
final Method toAssert = defaultMethod;
|
||||
Assert.state(toAssert == null, () -> "Only one @KafkaHandler can be marked 'isDefault', found: "
|
||||
+ toAssert.toString() + " and " + method.toString());
|
||||
|
||||
@@ -110,13 +110,12 @@ public class MethodKafkaListenerEndpoint<K, V> extends AbstractKafkaListenerEndp
|
||||
if (method != null) {
|
||||
SendTo ann = AnnotationUtils.getAnnotation(method, SendTo.class);
|
||||
if (ann != null) {
|
||||
if (method.getReturnType().equals(void.class)) {
|
||||
if (this.logger.isWarnEnabled()) {
|
||||
if (method.getReturnType().equals(void.class)
|
||||
&& this.logger.isWarnEnabled()) {
|
||||
this.logger.warn("Method "
|
||||
+ method
|
||||
+ " has a void return type; @SendTo is ignored" +
|
||||
(this.errorHandler == null ? "" : " unless the error handler returns a result"));
|
||||
}
|
||||
}
|
||||
String[] destinations = ann.value();
|
||||
if (destinations.length > 1) {
|
||||
|
||||
Reference in New Issue
Block a user