[jboss-cvs] JBossAS SVN: r74380 - projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 11 06:18:32 EDT 2008
Author: alesj
Date: 2008-06-11 06:18:32 -0400 (Wed, 11 Jun 2008)
New Revision: 74380
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java
Log:
Exclude Object scan.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java 2008-06-11 09:51:38 UTC (rev 74379)
+++ projects/jboss-deployers/trunk/deployers-impl/src/main/org/jboss/deployers/plugins/annotations/GenericAnnotationResourceVisitor.java 2008-06-11 10:18:32 UTC (rev 74380)
@@ -54,6 +54,7 @@
private ClassPool pool;
private boolean forceAnnotations;
private DefaultAnnotationEnvironment env;
+ private CtClass objectCtClass;
public GenericAnnotationResourceVisitor(ClassLoader classLoader)
{
@@ -69,6 +70,7 @@
this.pool = pool;
this.env = new DefaultAnnotationEnvironment(classLoader);
+ this.objectCtClass = pool.makeClass(Object.class.getName());
}
public ResourceFilter getFilter()
@@ -125,6 +127,9 @@
*/
protected void handleCtClass(CtClass ctClass, ResourceContext resource) throws ClassNotFoundException, NotFoundException
{
+ if (ctClass == null || objectCtClass.equals(ctClass))
+ return;
+
if (log.isTraceEnabled())
log.trace("Scanning class " + ctClass + " for annotations, resource url: " + resource.getUrl());
@@ -143,9 +148,7 @@
}
// super class
- ctClass = ctClass.getSuperclass();
- if (ctClass != null)
- handleCtClass(ctClass, resource);
+ handleCtClass(ctClass.getSuperclass(), resource);
}
/**
More information about the jboss-cvs-commits
mailing list