activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r987193 - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/command/ActiveMQMessage.java test/java/org/apache/activemq/command/ActiveMQMessageTest.java
Date Thu, 19 Aug 2010 15:30:50 GMT
Author: gtully
Date: Thu Aug 19 15:30:49 2010
New Revision: 987193

URL: http://svn.apache.org/viewvc?rev=987193&view=rev
Log:
resolve https://issues.apache.org/activemq/browse/AMQ-2840 - Eugene's carefull reading of
the sepc results in the JMSX props being returned in the enumeration

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java?rev=987193&r1=987192&r2=987193&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/command/ActiveMQMessage.java
Thu Aug 19 15:30:49 2010
@@ -282,7 +282,12 @@ public class ActiveMQMessage extends Mes
     public Enumeration getPropertyNames() throws JMSException {
         try {
             Vector<String> result = new Vector<String>(this.getProperties().keySet());
-            // omit stand jms props are per spec
+            // omit standard jms props as per spec
+            for (String propName : JMS_PROPERTY_SETERS.keySet()) {
+                if (propName.startsWith("JMSX")) {
+                    result.add(propName);
+                }
+            }
             return result.elements();
         } catch (IOException e) {
             throw JMSExceptionSupport.create(e);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java?rev=987193&r1=987192&r2=987193&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQMessageTest.java
Thu Aug 19 15:30:49 2010
@@ -354,7 +354,7 @@ public class ActiveMQMessageTest extends
         ActiveMQMessage msg = new ActiveMQMessage();
         String name1 = "floatProperty";
         msg.setFloatProperty(name1, 1.3f);
-        String name2 = "intProperty";
+        String name2 = "JMSXDeliveryCount";
         msg.setIntProperty(name2, 1);
         boolean found1 = false;
         boolean found2 = false;



Mime
View raw message