[Jboss-cvs] JBossAS SVN: r56046 - trunk/ejb3/src/main/org/jboss/injection
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Aug 17 21:58:34 EDT 2006
Author: bdecoste
Date: 2006-08-17 21:58:33 -0400 (Thu, 17 Aug 2006)
New Revision: 56046
Modified:
trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java
Log:
check for null handlers
Modified: trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java 2006-08-18 00:04:13 UTC (rev 56045)
+++ trunk/ejb3/src/main/org/jboss/injection/InjectionUtil.java 2006-08-18 01:58:33 UTC (rev 56046)
@@ -106,9 +106,13 @@
}
visitedMethods.add(method.getName());
}
- for (InjectionHandler handler : handlers)
+
+ if (handlers != null)
{
- handler.handleMethodAnnotations(method, container, classInjectors);
+ for (InjectionHandler handler : handlers)
+ {
+ handler.handleMethodAnnotations(method, container, classInjectors);
+ }
}
}
// recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored
@@ -121,14 +125,19 @@
{
return;
}
- Field[] fields = clazz.getDeclaredFields();
- for (Field field : fields)
+
+ if (handlers != null)
{
- for (InjectionHandler handler : handlers)
+ Field[] fields = clazz.getDeclaredFields();
+ for (Field field : fields)
{
- handler.handleFieldAnnotations(field, container, classInjectors);
+ for (InjectionHandler handler : handlers)
+ {
+ handler.handleFieldAnnotations(field, container, classInjectors);
+ }
}
}
+
// recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored
processFieldAnnotations(container, handlers, clazz.getSuperclass(), classInjectors);
}
@@ -139,10 +148,15 @@
{
return;
}
- for (InjectionHandler handler : handlers)
+
+ if (handlers != null)
{
- handler.handleClassAnnotations(clazz, container);
+ for (InjectionHandler handler : handlers)
+ {
+ handler.handleClassAnnotations(clazz, container);
+ }
}
+
// recursion needs to come last as the method could be overriden and we don't want the overriding method to be ignored
processClassAnnotations(container, handlers, clazz.getSuperclass());
}
More information about the jboss-cvs-commits
mailing list