[jboss-cvs] JBossAS SVN: r87887 - trunk/messaging/src/main/org/jboss/jms/server/destination.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Apr 27 14:00:10 EDT 2009


Author: emuckenhuber
Date: 2009-04-27 14:00:10 -0400 (Mon, 27 Apr 2009)
New Revision: 87887

Modified:
   trunk/messaging/src/main/org/jboss/jms/server/destination/SecurityConfigMapper.java
   trunk/messaging/src/main/org/jboss/jms/server/destination/StringObjectNameMetaMapper.java
Log:
additional null check and ignore a empty mapcomposite value.

Modified: trunk/messaging/src/main/org/jboss/jms/server/destination/SecurityConfigMapper.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/SecurityConfigMapper.java	2009-04-27 17:58:03 UTC (rev 87886)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/SecurityConfigMapper.java	2009-04-27 18:00:10 UTC (rev 87887)
@@ -123,11 +123,14 @@
       {
          MapCompositeValueSupport value = (MapCompositeValueSupport) metaValue;
          CompositeMetaType metaType = value.getMetaType();
+         // Don't create a empty securityConfig
+         if(metaType.itemSet().isEmpty())
+            return null;
+         
          // Create the dom document
          Document d = createDocument();
          // Security
          Element security = d.createElement("security");
-         // Get the roles
          for(String name : metaType.itemSet())
          {
             // Role

Modified: trunk/messaging/src/main/org/jboss/jms/server/destination/StringObjectNameMetaMapper.java
===================================================================
--- trunk/messaging/src/main/org/jboss/jms/server/destination/StringObjectNameMetaMapper.java	2009-04-27 17:58:03 UTC (rev 87886)
+++ trunk/messaging/src/main/org/jboss/jms/server/destination/StringObjectNameMetaMapper.java	2009-04-27 18:00:10 UTC (rev 87887)
@@ -68,7 +68,11 @@
       if(metaValue == null)
          return null;
 
-      SimpleValue sv = (SimpleValue) metaValue;
+      SimpleValue sv = (SimpleValue) metaValue;      
+      // ignore a null object name
+      if(sv.getValue() == null)
+         return null;
+      
       String str = sv.getValue().toString();
       try
       {




More information about the jboss-cvs-commits mailing list