[jboss-cvs] JBossAS SVN: r84823 - trunk/system/src/main/org/jboss/system/server/profileservice/persistence.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 26 15:36:54 EST 2009


Author: emuckenhuber
Date: 2009-02-26 15:36:54 -0500 (Thu, 26 Feb 2009)
New Revision: 84823

Modified:
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/AttachmentPropertyPopulator.java
   trunk/system/src/main/org/jboss/system/server/profileservice/persistence/ManagedObjectRecreationHandler.java
Log:
add primitive types and ignore collections/arrays when populating the attachment

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/AttachmentPropertyPopulator.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/AttachmentPropertyPopulator.java	2009-02-26 19:42:22 UTC (rev 84822)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/AttachmentPropertyPopulator.java	2009-02-26 20:36:54 UTC (rev 84823)
@@ -96,6 +96,13 @@
       MetaType metaType = property.getMetaType();
       MetaValue value = property.getValue();
 
+      // Skip collections and arrays for now
+      if(metaType.isCollection()
+            || metaType.isArray())
+      {
+        return;
+      }
+      
       // FIXME skip CompositeValueInvocationHandler
       if (metaType.isComposite())
       {
@@ -104,12 +111,6 @@
          if (Proxy.isProxyClass(unwrapped.getClass()))
             return;
       }
-      
-      // Unwrap generic managed objects
-      if(metaType.isCollection())
-      {
-         value = hackGenericCollectionSupport((CollectionValue) value);
-      }
 
       // Set value
       InstanceClassFactory icf = managedObjectFactory.getInstanceClassFactory(attachment.getClass(), null);

Modified: trunk/system/src/main/org/jboss/system/server/profileservice/persistence/ManagedObjectRecreationHandler.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/profileservice/persistence/ManagedObjectRecreationHandler.java	2009-02-26 19:42:22 UTC (rev 84822)
+++ trunk/system/src/main/org/jboss/system/server/profileservice/persistence/ManagedObjectRecreationHandler.java	2009-02-26 20:36:54 UTC (rev 84823)
@@ -112,6 +112,15 @@
       simpleTypes.put(Short.class.getName(), Short.class);
       simpleTypes.put(String.class.getName(), String.class);
       simpleTypes.put(Name.class.getName(), Name.class);
+      // primitive classes
+      simpleTypes.put(byte.class.getName(), byte.class);
+      simpleTypes.put(char.class.getName(), char.class);
+      simpleTypes.put(double.class.getName(), double.class);
+      simpleTypes.put(float.class.getName(), float.class);
+      simpleTypes.put(int.class.getName(), int.class);
+      simpleTypes.put(short.class.getName(), short.class);
+      simpleTypes.put(long.class.getName(), long.class);
+      simpleTypes.put(boolean.class.getName(), boolean.class);
    }
    
    public ManagedObjectRecreationHandler()




More information about the jboss-cvs-commits mailing list