[jboss-cvs] JBossAS SVN: r76752 - in projects/jboss-deployers/trunk: deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/structure/helpers and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 7 04:43:50 EDT 2008


Author: alesj
Date: 2008-08-07 04:43:50 -0400 (Thu, 07 Aug 2008)
New Revision: 76752

Modified:
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java
   projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
Log:
Optimize a bit.

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java	2008-08-07 08:39:23 UTC (rev 76751)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/main/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java	2008-08-07 08:43:50 UTC (rev 76752)
@@ -38,6 +38,7 @@
  * JARStructure.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
  * @version $Revision: 1.1 $
  */
 public class JARStructure extends AbstractVFSStructureDeployer
@@ -154,9 +155,12 @@
 
          boolean valid = true;
 
-         StructureContext parentContext = structureContext.getParentContext();
-         if (parentContext != null && parentContext.isCandidateAnnotationScanning() && isSupportsCandidateAnnotations())
-            valid = checkCandidateAnnotations(structureContext, file);
+         if (isSupportsCandidateAnnotations())
+         {
+            StructureContext parentContext = structureContext.getParentContext();
+            if (parentContext != null && parentContext.isCandidateAnnotationScanning())
+               valid = checkCandidateAnnotations(structureContext, file);
+         }
 
          if (valid)
          {

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java	2008-08-07 08:39:23 UTC (rev 76751)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java	2008-08-07 08:43:50 UTC (rev 76752)
@@ -350,8 +350,11 @@
       if (roots == null || roots.length == 0)
          throw new IllegalArgumentException("Null or empty roots");
 
+      if (candidateAnnotations == null || candidateAnnotations.isEmpty())
+         return true;
+
       StructureContext parentContext = context.getParentContext();
-      if (candidateAnnotations == null || candidateAnnotations.isEmpty() || parentContext == null)
+      if (parentContext == null)
          return true;
 
       Set<CandidateAnnotationsCallback> callbacks = parentContext.getCallbacks(CandidateAnnotationsCallback.class);




More information about the jboss-cvs-commits mailing list