mirror of
https://github.com/apache/activemq-artemis.git
synced 2025-03-04 00:09:56 +00:00
ARTEMIS-1874 fix NPE setting object property
This commit is contained in:
parent
6e6a76deab
commit
4d492bea0e
@ -965,7 +965,7 @@ public class ActiveMQMessage implements javax.jms.Message {
|
||||
boolean result = false;
|
||||
|
||||
if (jmsPropertyName.equals(name)) {
|
||||
message.putStringProperty(corePropertyName, value.toString());
|
||||
message.putStringProperty(corePropertyName, value == null ? null : value.toString());
|
||||
|
||||
result = true;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ import javax.jms.Session;
|
||||
import javax.jms.StreamMessage;
|
||||
|
||||
import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
|
||||
import org.apache.activemq.artemis.reader.MessageUtil;
|
||||
import org.apache.activemq.artemis.tests.integration.IntegrationTestLogger;
|
||||
import org.apache.activemq.artemis.tests.util.JMSTestBase;
|
||||
import org.junit.Assert;
|
||||
@ -193,6 +194,10 @@ public class MessageTest extends JMSTestBase {
|
||||
|
||||
msg.setObjectProperty(MessageTest.propName1, null);
|
||||
|
||||
msg.setObjectProperty(MessageUtil.JMSXGROUPID, null);
|
||||
|
||||
msg.setObjectProperty(MessageUtil.JMSXUSERID, null);
|
||||
|
||||
msg.setStringProperty(MessageTest.propName2, null);
|
||||
|
||||
msg.getStringProperty(MessageTest.propName1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user