You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/10/21 14:43:25 UTC
svn commit: r1633361 -
/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
Author: rgodfrey
Date: Tue Oct 21 12:43:25 2014
New Revision: 1633361
URL: http://svn.apache.org/r1633361
Log:
QPID-6172 : Ensure the type attribute is always present in the actual attribute map
Modified:
qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java?rev=1633361&r1=1633360&r2=1633361&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java (original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java Tue Oct 21 12:43:25 2014
@@ -225,7 +225,7 @@ public abstract class AbstractConfigured
if(idObj == null)
{
uuid = UUID.randomUUID();
- attributes = new HashMap<String, Object>(attributes);
+ attributes = new LinkedHashMap<>(attributes);
attributes.put(ID, uuid);
}
else
@@ -247,6 +247,11 @@ public abstract class AbstractConfigured
throw new IllegalConfigurationException("Provided type is " + attributes.get(TYPE)
+ " but calculated type is " + _type);
}
+ else if(attributes.get(TYPE) == null)
+ {
+ attributes = new LinkedHashMap<>(attributes);
+ attributes.put(TYPE, _type);
+ }
for (Class<? extends ConfiguredObject> childClass : getModel().getChildTypes(getCategoryClass()))
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org