qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r1463159 - in /qpid/branches/0.22/qpid/java: ./ amqp-1-0-client-jms/ amqp-1-0-client/ amqp-1-0-common/ broker/ broker/bin/ broker/src/main/java/org/apache/qpid/server/message/ broker/src/main/java/org/apache/qpid/server/model/adapter/ broke...
Date Mon, 01 Apr 2013 15:25:01 GMT
Author: robbie
Date: Mon Apr  1 15:25:00 2013
New Revision: 1463159

URL: http://svn.apache.org/r1463159
Log:
QPID-4661: Fix broker attribute conversion bug

merged from trunk r1462470

Modified:
    qpid/branches/0.22/qpid/java/   (props changed)
    qpid/branches/0.22/qpid/java/amqp-1-0-client/   (props changed)
    qpid/branches/0.22/qpid/java/amqp-1-0-client-jms/   (props changed)
    qpid/branches/0.22/qpid/java/amqp-1-0-common/   (props changed)
    qpid/branches/0.22/qpid/java/broker/   (props changed)
    qpid/branches/0.22/qpid/java/broker/bin/   (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0/
  (props changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/   (props
changed)
    qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java
  (props changed)
    qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java
  (props changed)
    qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
  (props changed)
    qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
    qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
  (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/CPPExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/Excludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaBDBExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaPre010Excludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/JavaTransientExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/XAExcludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.async.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.cluster.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.noprefetch.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.excludes   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/cpp.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-bdb.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-dby.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/java-mms.0-9-1.testprofile   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/log4j-test.xml   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/test-provider.properties   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/test_resources/   (props changed)
    qpid/branches/0.22/qpid/java/test-profiles/testprofile.defaults   (props changed)

Propchange: qpid/branches/0.22/qpid/java/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java:r1462470

Propchange: qpid/branches/0.22/qpid/java/amqp-1-0-client/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client:r1462470

Propchange: qpid/branches/0.22/qpid/java/amqp-1-0-client-jms/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-client-jms:r1462470

Propchange: qpid/branches/0.22/qpid/java/amqp-1-0-common/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/amqp-1-0-common:r1462470

Propchange: qpid/branches/0.22/qpid/java/broker/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker:r1462470

Propchange: qpid/branches/0.22/qpid/java/broker/bin/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/bin:r1462470

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java:r1462470

Modified: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java?rev=1463159&r1=1463158&r2=1463159&view=diff
==============================================================================
--- qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
(original)
+++ qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/model/adapter/BrokerAdapter.java
Mon Apr  1 15:25:00 2013
@@ -1028,9 +1028,9 @@ public class BrokerAdapter extends Abstr
         Collection<String> names = AVAILABLE_ATTRIBUTES;
         for (String name : names)
         {
-            if (attributes.containsKey(name))
+            if (convertedAttributes.containsKey(name))
             {
-                Object desired = attributes.get(name);
+                Object desired = convertedAttributes.get(name);
                 Object expected = getAttribute(name);
                 if (changeAttribute(name, expected, desired))
                 {

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_1_0_0_SASL.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/v1_0:r1462470

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue:r1462470

Propchange: qpid/branches/0.22/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/LoggingManagement.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedBroker.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedConnection.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedExchange.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanAttribute.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanConstructor.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanDescription.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperation.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/annotations/MBeanOperationParameter.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/server/SupportedProtocolVersionsTest.java:r1462470

Modified: qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java?rev=1463159&r1=1463158&r2=1463159&view=diff
==============================================================================
--- qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
(original)
+++ qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/systest/rest/BrokerRestTest.java
Mon Apr  1 15:25:00 2013
@@ -34,7 +34,6 @@ import org.apache.qpid.server.model.Life
 import org.apache.qpid.server.model.Port;
 import org.apache.qpid.server.model.State;
 import org.apache.qpid.server.model.VirtualHost;
-import org.apache.qpid.server.model.adapter.BrokerAdapter;
 import org.apache.qpid.test.utils.QpidTestCase;
 import org.apache.qpid.test.utils.TestBrokerConfiguration;
 import org.apache.qpid.test.utils.TestSSLConstants;
@@ -103,6 +102,28 @@ public class BrokerRestTest extends Qpid
         assertBrokerAttributes(brokerAttributes, brokerDetails);
     }
 
+    public void testPutUpdateWhereNumericAttributesAreSetAsStringValues() throws Exception
+    {
+        Map<String, Object> validAttributes = getValidBrokerAttributes();
+        Map<String, Object> attributes = new HashMap<String, Object>();
+
+        for (Map.Entry<String, Object> entry : validAttributes.entrySet())
+        {
+            Object value = entry.getValue();
+            if (value instanceof Number)
+            {
+                value = String.valueOf(value);
+            }
+            attributes.put(entry.getKey(), value);
+        }
+
+        int response = getRestTestHelper().submitRequest("/rest/broker", "PUT", attributes);
+        assertEquals("Unexpected update response", 200, response);
+
+        Map<String, Object> brokerDetails = getRestTestHelper().getJsonAsSingletonList("/rest/broker");
+        assertBrokerAttributes(validAttributes, brokerDetails);
+    }
+
     public void testPutToUpdateWithInvalidAttributeValues() throws Exception
     {
         Map<String, Object> invalidAttributes = new HashMap<String, Object>();

Propchange: qpid/branches/0.22/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/CPPExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/CPPExcludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/Excludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaBDBExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaBDBExcludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaExcludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaPre010Excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaPre010Excludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/JavaTransientExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/JavaTransientExcludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/XAExcludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.async.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.cluster.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.noprefetch.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.excludes
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.ssl.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/cpp.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/cpp.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-bdb-spawn.0-9-1.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-bdb.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-bdb.0-9-1.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-dby.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-dby.0-9-1.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-10.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/java-mms.0-9-1.testprofile
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/java-mms.0-9-1.testprofile:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/log4j-test.xml
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/log4j-test.xml:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/test-provider.properties
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/test-provider.properties:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/test_resources/
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/test_resources:r1462470

Propchange: qpid/branches/0.22/qpid/java/test-profiles/testprofile.defaults
------------------------------------------------------------------------------
  Merged /qpid/trunk/qpid/java/test-profiles/testprofile.defaults:r1462470



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message