From 9d0dcf7f63904928f1c69e110647d75b241b37d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 25 Aug 2016 12:08:08 +0300 Subject: [PATCH] Unchecked warning suppression fixes --- .../activemq/artemis/jms/client/ActiveMQBytesMessage.java | 3 ++- .../apache/activemq/artemis/jms/client/ActiveMQMapMessage.java | 3 ++- .../activemq/artemis/jms/client/ActiveMQTextMessage.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java index e1707015ec..b585caf046 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQBytesMessage.java @@ -378,7 +378,8 @@ public class ActiveMQBytesMessage extends ActiveMQMessage implements BytesMessag } @Override - public boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class c) { + @SuppressWarnings("unchecked") + public boolean isBodyAssignableTo(Class c) { return c.isAssignableFrom(byte[].class); } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java index d067593b1c..a80d550f7b 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQMapMessage.java @@ -384,7 +384,8 @@ public final class ActiveMQMapMessage extends ActiveMQMessage implements MapMess } @Override - public boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class c) { + @SuppressWarnings("unchecked") + public boolean isBodyAssignableTo(Class c) { if (hasNoBody()) { return true; } diff --git a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java index aa3633632e..7d84bd4644 100644 --- a/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java +++ b/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQTextMessage.java @@ -120,7 +120,8 @@ public class ActiveMQTextMessage extends ActiveMQMessage implements TextMessage } @Override - public boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class c) { + @SuppressWarnings("unchecked") + public boolean isBodyAssignableTo(ctiClass c) { if (text == null) return true; return c.isAssignableFrom(java.lang.String.class);