[jboss-cvs] JBossAS SVN: r95222 - projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 20 19:19:47 EDT 2009
Author: alesj
Date: 2009-10-20 19:19:47 -0400 (Tue, 20 Oct 2009)
New Revision: 95222
Modified:
projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java
projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/DefaultAnnotationScanner.java
projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/ModuleAnnotationScanner.java
Log:
Allow empty urls.
Modified: projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java
===================================================================
--- projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java 2009-10-20 22:37:53 UTC (rev 95221)
+++ projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/AbstractAnnotationScanner.java 2009-10-20 23:19:47 UTC (rev 95222)
@@ -64,8 +64,8 @@
list.add(url);
}
- if (list.isEmpty() == false)
- rescan(repository, list.toArray(new URL[list.size()]), classLoader);
+ // re-scan the rest
+ rescan(repository, list.toArray(new URL[list.size()]), classLoader);
return repository;
}
Modified: projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/DefaultAnnotationScanner.java
===================================================================
--- projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/DefaultAnnotationScanner.java 2009-10-20 22:37:53 UTC (rev 95221)
+++ projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/DefaultAnnotationScanner.java 2009-10-20 23:19:47 UTC (rev 95222)
@@ -57,22 +57,22 @@
protected void rescan(DefaultAnnotationRepository repo, URL[] urls, ClassLoader classLoader) throws Exception
{
- VirtualFile[] roots = new VirtualFile[urls.length];
- for (int i = 0; i < roots.length; i++)
- {
- roots[i] = VFS.getRoot(urls[i]);
- }
-
ResourceVisitor visitor = createResourceVisitor(repo);
ResourceFilter filter = resourceFilter;
if (filter == null)
filter = visitor.getFilter();
- visit(roots, classLoader, visitor, filter, urls);
+ visit(classLoader, urls, visitor, filter);
}
- protected void visit(VirtualFile[] roots, ClassLoader classLoader, ResourceVisitor visitor, ResourceFilter filter, URL[] urls)
+ protected void visit(ClassLoader classLoader, URL[] urls, ResourceVisitor visitor, ResourceFilter filter) throws Exception
{
+ VirtualFile[] roots = new VirtualFile[urls.length];
+ for (int i = 0; i < roots.length; i++)
+ {
+ roots[i] = VFS.getRoot(urls[i]);
+ }
+
VFSResourceVisitor.visit(roots, excludedRoots, included, excluded, classLoader, visitor, filter, recurseFilter, urls);
}
Modified: projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/ModuleAnnotationScanner.java
===================================================================
--- projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/ModuleAnnotationScanner.java 2009-10-20 22:37:53 UTC (rev 95221)
+++ projects/mc-ann/trunk/core/src/main/java/org/jboss/mcann/scanner/ModuleAnnotationScanner.java 2009-10-20 23:19:47 UTC (rev 95222)
@@ -26,7 +26,6 @@
import org.jboss.classloading.spi.dependency.Module;
import org.jboss.classloading.spi.visitor.ResourceFilter;
import org.jboss.classloading.spi.visitor.ResourceVisitor;
-import org.jboss.virtual.VirtualFile;
/**
* Module annotation scanner.
@@ -45,7 +44,7 @@
}
@Override
- protected void visit(VirtualFile[] roots, ClassLoader classLoader, ResourceVisitor visitor, ResourceFilter filter, URL[] urls)
+ protected void visit(ClassLoader classLoader, URL[] urls, ResourceVisitor visitor, ResourceFilter filter)
{
module.visit(visitor, filter, recurseFilter, urls);
}
More information about the jboss-cvs-commits
mailing list