[jboss-cvs] JBossAS SVN: r64467 - projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/factory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 6 09:25:14 EDT 2007


Author: adrian at jboss.org
Date: 2007-08-06 09:25:14 -0400 (Mon, 06 Aug 2007)
New Revision: 64467

Modified:
   projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/factory/AbstractManagedObjectFactory.java
Log:
Better error message.

Modified: projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/factory/AbstractManagedObjectFactory.java
===================================================================
--- projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/factory/AbstractManagedObjectFactory.java	2007-08-06 13:23:25 UTC (rev 64466)
+++ projects/microcontainer/trunk/managed/src/main/org/jboss/managed/plugins/factory/AbstractManagedObjectFactory.java	2007-08-06 13:25:14 UTC (rev 64467)
@@ -160,7 +160,10 @@
          throw new IllegalArgumentException("Null class");
 
       ManagedObjectBuilder builder = getBuilder(clazz);
-      return builder.buildManagedObject(clazz);
+      ManagedObject result = builder.buildManagedObject(clazz);
+      if (result == null)
+         throw new IllegalStateException("Builder returned null object: " + builder);
+      return result;
    }
    
    public ManagedObject buildManagedObject(Class<? extends Serializable> clazz)




More information about the jboss-cvs-commits mailing list