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);