Author: scabanovich
Date: 2007-07-16 11:50:25 -0400 (Mon, 16 Jul 2007)
New Revision: 2447
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
Log:
EXIN-217 One more null pointer in ComponentBuilder fixed
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-16
15:45:10 UTC (rev 2446)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/scanner/java/ComponentBuilder.java 2007-07-16
15:50:25 UTC (rev 2447)
@@ -242,7 +242,7 @@
}
}
ResolvedAnnotation[] as = annotatedType.getAnnotations();
- for (int i = 0; i < as.length; i++) {
+ if(as != null) for (int i = 0; i < as.length; i++) {
if(ROLE_ANNOTATION_TYPE.equals(as[i].getType())) {
createRole(as[i].getAnnotation());
}
@@ -268,6 +268,7 @@
private Annotation findAnnotation(AnnotatedASTNode<?> n, String type) {
ResolvedAnnotation[] as = n.getAnnotations();
+ if(as == null) return null;
for (int i = 0; i < as.length; i++) {
if(type.equals(as[i].getType())) return as[i].getAnnotation();
}
Show replies by date