[seam-commits] Seam SVN: r10381 - trunk/src/main/org/jboss/seam/init.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sat Apr 11 00:38:39 EDT 2009


Author: dan.j.allen
Date: 2009-04-11 00:38:39 -0400 (Sat, 11 Apr 2009)
New Revision: 10381

Modified:
   trunk/src/main/org/jboss/seam/init/Initialization.java
Log:
JBSEAM-4105 fix NullPointerException


Modified: trunk/src/main/org/jboss/seam/init/Initialization.java
===================================================================
--- trunk/src/main/org/jboss/seam/init/Initialization.java	2009-04-11 01:20:42 UTC (rev 10380)
+++ trunk/src/main/org/jboss/seam/init/Initialization.java	2009-04-11 04:38:39 UTC (rev 10381)
@@ -319,9 +319,13 @@
 			   }
 
 			   try {
-				   //get the class implied by the namespaced XML element name
-				   Class<Object> clazz = Reflections.classForName(className);
-				   Name nameAnnotation = clazz.getAnnotation(Name.class);
+               Class<Object> clazz = null;
+               Name nameAnnotation = null;
+               if (className != null) {
+				       //get the class implied by the namespaced XML element name
+				       clazz = Reflections.classForName(className);
+				       nameAnnotation = clazz.getAnnotation(Name.class);
+               }
 
 				   //if the name attribute is not explicitly specified in the XML,
 				   //imply the name from the @Name annotation on the class implied




More information about the seam-commits mailing list