[jboss-cvs] JBossAS SVN: r67004 - branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 13 03:56:23 EST 2007


Author: wolfc
Date: 2007-11-13 03:56:23 -0500 (Tue, 13 Nov 2007)
New Revision: 67004

Modified:
   branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
Log:
EJBTHREE-1104: merged 67001

Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-11-13 08:51:04 UTC (rev 67003)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java	2007-11-13 08:56:23 UTC (rev 67004)
@@ -1286,18 +1286,22 @@
       }
    }
    
+   // FIXME: Wolf: Why do we have this method here? It's a bean property setter, so should
+   // be part of bean spi.
    protected void setAnnotationPropertyField(Field field, Object annotation, String value) throws Exception
    {
       if (field.getType() == String.class)
          field.set(annotation, value);
-      else if (field.getType() == Long.class)
+      else if (field.getType() == Long.class || field.getType() == Long.TYPE)
          field.setLong(annotation, Long.parseLong(value));
-      else if (field.getType() == Integer.class)
+      else if (field.getType() == Integer.class || field.getType() == Integer.TYPE)
          field.setInt(annotation, Integer.parseInt(value));
       else if (field.getType() == Class.class)
          field.set(annotation, di.getClassLoader().loadClass(value));
-      else if (field.getType() == Boolean.class)
+      else if (field.getType() == Boolean.class || field.getType() == Boolean.TYPE)
          field.setBoolean(annotation, Boolean.parseBoolean(value));
+      else
+         throw new IllegalArgumentException("unsupported field type " + field.getType() + " on field " + field);
    }
 
    private void addCacheAnnotations(EJBContainer container,




More information about the jboss-cvs-commits mailing list