From 6379c3354be58c61e430e3c2e6e94978ba119e3f Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Wed, 21 Mar 2018 16:26:53 -0400 Subject: [PATCH] Polished few additional compile warnings Resolves #1321 --- .../cloud/stream/annotation/EnableBinding.java | 1 - .../binding/StreamListenerAnnotationBeanPostProcessor.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/annotation/EnableBinding.java b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/annotation/EnableBinding.java index 9d17a1434..b81eb6758 100644 --- a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/annotation/EnableBinding.java +++ b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/annotation/EnableBinding.java @@ -39,7 +39,6 @@ import org.springframework.integration.config.EnableIntegration; * @author Marius Bogoevici * @author David Turanski */ -@SuppressWarnings("deprecation") @Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE }) @Retention(RetentionPolicy.RUNTIME) @Documented diff --git a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binding/StreamListenerAnnotationBeanPostProcessor.java b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binding/StreamListenerAnnotationBeanPostProcessor.java index 4cd6085f5..ca349f29a 100644 --- a/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binding/StreamListenerAnnotationBeanPostProcessor.java +++ b/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binding/StreamListenerAnnotationBeanPostProcessor.java @@ -267,7 +267,7 @@ public class StreamListenerAnnotationBeanPostProcessor implements BeanPostProces /** * This operations ensures that required dependencies are not accidentally injected early given that this bean is BPP. */ - @SuppressWarnings("unchecked") + @SuppressWarnings({ "unchecked", "rawtypes" }) private void injectAndPostProcessDependencies() { Collection streamListenerParameterAdapters = this.applicationContext.getBeansOfType(StreamListenerParameterAdapter.class).values(); Collection streamListenerResultAdapters = this.applicationContext.getBeansOfType(StreamListenerResultAdapter.class).values(); @@ -327,6 +327,7 @@ public class StreamListenerAnnotationBeanPostProcessor implements BeanPostProces } } + @SuppressWarnings("rawtypes") private class DefaultStreamListenerSetupMethodOrchestrator implements StreamListenerSetupMethodOrchestrator { private final ConfigurableApplicationContext applicationContext; @@ -370,7 +371,7 @@ public class StreamListenerAnnotationBeanPostProcessor implements BeanPostProces return true; } - @SuppressWarnings({"rawtypes", "unchecked"}) + @SuppressWarnings("unchecked") private void invokeStreamListenerResultAdapter(Method method, Object bean, String outboundName, Object... arguments) { try { if (Void.TYPE.equals(method.getReturnType())) {