[jboss-cvs] JBossAS SVN: r106056 - in projects/scanning/trunk: plugins/src/main/java/org/jboss/scanning/annotations/spi and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 15 11:49:14 EDT 2010
Author: bill.burke at jboss.com
Date: 2010-06-15 11:49:13 -0400 (Tue, 15 Jun 2010)
New Revision: 106056
Added:
projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnImplementedInterface.java
projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnInterface.java
Modified:
projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/DefaultAnnotationRepository.java
projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/GenericAnnotationVisitor.java
projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/MutableAnnotationRepository.java
projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/spi/AnnotationIndex.java
projects/scanning/trunk/scanning-impl/src/main/java/org/jboss/scanning/plugins/visitor/ClassHierarchyResourceVisitor.java
projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/test/AnnotationsScanningTestCase.java
projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/metadata/test/ScanningUnitTestCase.java
Log:
classes implementing interface with annotation
Modified: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/DefaultAnnotationRepository.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/DefaultAnnotationRepository.java 2010-06-15 15:45:01 UTC (rev 106055)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/DefaultAnnotationRepository.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -22,6 +22,11 @@
package org.jboss.scanning.annotations.plugins;
+import org.jboss.metadata.spi.signature.Signature;
+import org.jboss.scanning.annotations.spi.Element;
+import org.jboss.scanning.spi.ScanningHandle;
+import org.jboss.util.collection.CollectionsFactory;
+
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
@@ -33,13 +38,12 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.URL;
-import java.util.*;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
-import org.jboss.metadata.spi.signature.Signature;
-import org.jboss.scanning.annotations.spi.Element;
-import org.jboss.scanning.spi.ScanningHandle;
-import org.jboss.util.collection.CollectionsFactory;
-
/**
* DefaultAnnotationEnvironment.
*
@@ -47,15 +51,28 @@
*/
public class DefaultAnnotationRepository extends MutableAnnotationRepository implements Externalizable, ScanningHandle<DefaultAnnotationRepository>
{
- /** The serial version UID */
+ /**
+ * The serial version UID
+ */
private static final long serialVersionUID = 1L;
- /** The info map */
+ /**
+ * The info map
+ */
private Map<String, Map<Class<? extends Annotation>, Map<ElementType, Set<ClassSignaturePair>>>> env;
- /** The checked class names */
+ /**
+ * The checked class names
+ */
private transient Set<String> checkedClassNames = new HashSet<String>();
- /** Should we keep the annotation */
+ /**
+ * Should we keep the annotation
+ */
private boolean keepAnnotations;
+ /**
+ * annotation index of implemented interfaces
+ */
+ private Map<String, Set<String>> classesImplementingInterfaceAnnotatedWith;
+
/**
* Should only be used for de-serialization.
*/
@@ -68,6 +85,7 @@
{
super(classLoader);
env = new HashMap<String, Map<Class<? extends Annotation>, Map<ElementType, Set<ClassSignaturePair>>>>();
+ classesImplementingInterfaceAnnotatedWith = new HashMap<String, Set<String>>();
}
@Override
@@ -79,12 +97,14 @@
public void writeExternal(ObjectOutput out) throws IOException
{
out.writeObject(env);
+ out.writeObject(classesImplementingInterfaceAnnotatedWith);
}
@SuppressWarnings("unchecked")
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
- env = (Map)in.readObject();
+ env = (Map) in.readObject();
+ classesImplementingInterfaceAnnotatedWith = (Map) in.readObject();
}
/**
@@ -107,6 +127,42 @@
}
/**
+ * Index of classes that implement an interface that are annotated directly with an annotation:
+ * <p/>
+ * i.e.
+ * <p/>
+ * <pre>@Path("/foo")
+ * public interface MyIntf {}
+ * <p/>
+ * public class MyResource implements MyIntf {}
+ * </pre>
+ * <p/>
+ * In this case MyResource is related to @Path through MyIntf
+ *
+ * @param annotation
+ * @return
+ */
+ public Set<String> classesImplementingInterfacesAnnotatedWith(String annotation)
+ {
+ Set<String> classes = classesImplementingInterfaceAnnotatedWith.get(annotation);
+ if (classes == null) classes = Collections.emptySet();
+ return classes;
+ }
+
+ @Override
+ public void addClassImplementingInterfaceAnnotatedWith(String annotationName, String className)
+ {
+ Set<String> classes = classesImplementingInterfaceAnnotatedWith.get(annotationName);
+ if (classes == null)
+ {
+ classes = new HashSet<String>();
+ classesImplementingInterfaceAnnotatedWith.put(annotationName, classes);
+ }
+ classes.add(className);
+ }
+
+
+ /**
* Get env map.
*
* @return the env map
@@ -137,6 +193,17 @@
}
}
}
+ for (Map.Entry<String, Set<String>> entry : subHandle.classesImplementingInterfaceAnnotatedWith.entrySet())
+ {
+ Set<String> mySet = classesImplementingInterfaceAnnotatedWith.get(entry.getKey());
+ if (mySet == null)
+ {
+ mySet = new HashSet<String>();
+ classesImplementingInterfaceAnnotatedWith.put(entry.getKey(), mySet);
+ }
+ mySet.addAll(entry.getValue());
+ }
+
}
/**
@@ -154,10 +221,10 @@
* Put the annotation info.
*
* @param annotation the annotation
- * @param type the annotation type
- * @param className the class name
- * @param signature the signature
- * @param ownerURL the class owner url
+ * @param type the annotation type
+ * @param className the class name
+ * @param signature the signature
+ * @param ownerURL the class owner url
*/
void putAnnotation(Annotation annotation, ElementType type, String className, Signature signature, URL ownerURL)
{
@@ -168,11 +235,11 @@
* Put the annotation info.
*
* @param annotation the annotation
- * @param annClass the annotation class
- * @param type the annotation type
- * @param className the class name
- * @param signature the signature
- * @param path the owner url path
+ * @param annClass the annotation class
+ * @param type the annotation type
+ * @param className the class name
+ * @param signature the signature
+ * @param path the owner url path
*/
void putAnnotation(Annotation annotation, Class<? extends Annotation> annClass, ElementType type, String className, Signature signature, String path)
{
@@ -216,9 +283,9 @@
/**
* Get matching cs pairs.
*
- * @param path the owner path
+ * @param path the owner path
* @param annClass the annotation class
- * @param type the annotation type
+ * @param type the annotation type
* @return class names
*/
protected Set<ClassSignaturePair> getCSPairs(String path, Class<? extends Annotation> annClass, ElementType type)
@@ -256,19 +323,19 @@
/**
* Transform class names into classes.
*
- * @param <A> the annotation type
- * @param <M> the annotated element type
- * @param path the classpath entry
- * @param type the annotation type
+ * @param <A> the annotation type
+ * @param <M> the annotated element type
+ * @param path the classpath entry
+ * @param type the annotation type
* @param annClass the annotation class
- * @param aoClass the ao class
+ * @param aoClass the ao class
* @return classes
*/
protected <A extends Annotation, M extends AnnotatedElement> Set<Element<A, M>> transformToElements(
- String path,
- ElementType type,
- Class<A> annClass,
- Class<M> aoClass
+ String path,
+ ElementType type,
+ Class<A> annClass,
+ Class<M> aoClass
)
{
Set<ClassSignaturePair> pairs = getCSPairs(path, annClass, type);
@@ -286,9 +353,9 @@
if (type == ElementType.TYPE)
element = new ClassElement<A, M>(classLoader, className, annClass, annotation);
else if (type == ElementType.PARAMETER)
- element = new ParametersElement<A,M>(classLoader, className, pair.getSignature(), annClass, annotation, aoClass);
+ element = new ParametersElement<A, M>(classLoader, className, pair.getSignature(), annClass, annotation, aoClass);
else
- element = new DefaultElement<A,M>(classLoader, className, pair.getSignature(), annClass, annotation, aoClass);
+ element = new DefaultElement<A, M>(classLoader, className, pair.getSignature(), annClass, annotation, aoClass);
elements.add(element);
}
return elements;
@@ -359,7 +426,7 @@
if (Annotation.class.isAssignableFrom(clazz) == false)
throw new IllegalArgumentException("Annotation name " + annotationName + " doesn't extend Annotation class.");
- return (Class<Annotation>)clazz;
+ return (Class<Annotation>) clazz;
}
public boolean hasClassAnnotatedWith(String annotationName)
Modified: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/GenericAnnotationVisitor.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/GenericAnnotationVisitor.java 2010-06-15 15:45:01 UTC (rev 106055)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/GenericAnnotationVisitor.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -22,24 +22,27 @@
package org.jboss.scanning.annotations.plugins;
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.net.URL;
-
import org.jboss.classloading.spi.visitor.ClassFilter;
import org.jboss.classloading.spi.visitor.ResourceFilter;
import org.jboss.metadata.spi.signature.Signature;
+import org.jboss.reflect.spi.AnnotationValue;
import org.jboss.reflect.spi.ClassInfo;
import org.jboss.scanning.plugins.helpers.ResourceOwnerFinder;
import org.jboss.scanning.plugins.visitor.ClassHierarchyResourceVisitor;
import org.jboss.scanning.plugins.visitor.ReflectProvider;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.net.URL;
+
/**
* @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
*/
public class GenericAnnotationVisitor extends ClassHierarchyResourceVisitor
{
- /** The mutable repository */
+ /**
+ * The mutable repository
+ */
private MutableAnnotationRepository repository;
public GenericAnnotationVisitor(ReflectProvider provider, ResourceOwnerFinder finder, MutableAnnotationRepository repository)
@@ -61,6 +64,23 @@
}
@Override
+ protected void handleInterfaces(ClassInfo classInfo)
+ {
+ ClassInfo[] interfaces = classInfo.getInterfaces();
+ if (interfaces != null && interfaces.length > 0)
+ {
+ for (ClassInfo intf : interfaces)
+ {
+ for (AnnotationValue val : intf.getAnnotations())
+ {
+ repository.addClassImplementingInterfaceAnnotatedWith(val.getAnnotationType().getName(), classInfo.getName());
+ }
+ }
+ }
+
+ }
+
+ @Override
protected void handleAnnotations(ElementType type, Signature signature, Annotation[] annotations, String className, URL ownerURL)
{
if (annotations != null && annotations.length > 0)
Modified: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/MutableAnnotationRepository.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/MutableAnnotationRepository.java 2010-06-15 15:45:01 UTC (rev 106055)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/plugins/MutableAnnotationRepository.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -22,14 +22,14 @@
package org.jboss.scanning.annotations.plugins;
+import org.jboss.metadata.spi.signature.Signature;
+import org.jboss.scanning.annotations.spi.AnnotationIndex;
+import org.jboss.scanning.plugins.helpers.WeakClassLoaderHolder;
+
import java.lang.annotation.Annotation;
import java.lang.annotation.ElementType;
import java.net.URL;
-import org.jboss.metadata.spi.signature.Signature;
-import org.jboss.scanning.annotations.spi.AnnotationIndex;
-import org.jboss.scanning.plugins.helpers.WeakClassLoaderHolder;
-
/**
* Mutable annotation repository.
*
@@ -56,10 +56,10 @@
* Put the annotation info.
*
* @param annotation the annotation
- * @param type the annotation type
- * @param className the class name
- * @param signature the signature
- * @param ownerURL the class owner url
+ * @param type the annotation type
+ * @param className the class name
+ * @param signature the signature
+ * @param ownerURL the class owner url
*/
abstract void putAnnotation(Annotation annotation, ElementType type, String className, Signature signature, URL ownerURL);
@@ -70,4 +70,6 @@
* @return true if already checked, false otherwise
*/
abstract boolean isAlreadyChecked(String className);
+
+ public abstract void addClassImplementingInterfaceAnnotatedWith(String annotationName, String className);
}
\ No newline at end of file
Modified: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/spi/AnnotationIndex.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/spi/AnnotationIndex.java 2010-06-15 15:45:01 UTC (rev 106055)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/annotations/spi/AnnotationIndex.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -38,11 +38,29 @@
/**
* Get all classes who have annotated type annotated with annotation param.
*
- * @param <A> the annotation type
- * @param url the classpath entry, if null all classes in classpath are checked
+ * @param <A> the annotation type
+ * @param url the classpath entry, if null all classes in classpath are checked
* @param annotation the annotation we're querying for
- * @param type annotation element type, if null all types are matched
+ * @param type annotation element type, if null all types are matched
* @return set of matching classes
*/
<A extends Annotation> Set<Element<A, AnnotatedElement>> getAnnotatedClasses(URL url, Class<A> annotation, ElementType type);
+
+ /**
+ * Index of classes that implement an interface that are annotated directly with an annotation:
+ * <p/>
+ * i.e.
+ * <p/>
+ * <pre>@Path("/foo")
+ * public interface MyIntf {}
+ * <p/>
+ * public class MyResource implements MyIntf {}
+ * </pre>
+ * <p/>
+ * In this case MyResource is related to @Path through MyIntf
+ *
+ * @param annotation
+ * @return
+ */
+ Set<String> classesImplementingInterfacesAnnotatedWith(String annotation);
}
Modified: projects/scanning/trunk/scanning-impl/src/main/java/org/jboss/scanning/plugins/visitor/ClassHierarchyResourceVisitor.java
===================================================================
--- projects/scanning/trunk/scanning-impl/src/main/java/org/jboss/scanning/plugins/visitor/ClassHierarchyResourceVisitor.java 2010-06-15 15:45:01 UTC (rev 106055)
+++ projects/scanning/trunk/scanning-impl/src/main/java/org/jboss/scanning/plugins/visitor/ClassHierarchyResourceVisitor.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -22,17 +22,22 @@
package org.jboss.scanning.plugins.visitor;
-import java.lang.annotation.Annotation;
-import java.lang.annotation.ElementType;
-import java.net.URL;
-
import org.jboss.classloading.spi.visitor.ResourceContext;
import org.jboss.metadata.spi.signature.ConstructorParametersSignature;
import org.jboss.metadata.spi.signature.MethodParametersSignature;
import org.jboss.metadata.spi.signature.Signature;
-import org.jboss.reflect.spi.*;
+import org.jboss.reflect.spi.AnnotatedInfo;
+import org.jboss.reflect.spi.ClassInfo;
+import org.jboss.reflect.spi.ConstructorInfo;
+import org.jboss.reflect.spi.MemberInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.reflect.spi.ParameterInfo;
import org.jboss.scanning.plugins.helpers.ResourceOwnerFinder;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.net.URL;
+
/**
* Class hierarchy resource visitor.
*
@@ -60,6 +65,11 @@
*/
protected abstract boolean isRelevant(ClassInfo classInfo);
+ protected void handleInterfaces(ClassInfo classInfo)
+ {
+
+ }
+
protected void handleClass(ResourceContext resource, ClassInfo classInfo) throws Exception
{
if (classInfo == null || isRelevant(classInfo) == false)
@@ -71,12 +81,14 @@
URL ownerURL = finder.findOwnerURL(resource);
+ handleInterfaces(classInfo);
+
Annotation[] annotations = classInfo.getUnderlyingAnnotations();
- handleAnnotations(ElementType.TYPE, (Signature)null, annotations, className, ownerURL);
+ handleAnnotations(ElementType.TYPE, (Signature) null, annotations, className, ownerURL);
handleMembers(ElementType.CONSTRUCTOR, classInfo.getDeclaredConstructors(), className, ownerURL);
handleMembers(ElementType.METHOD, classInfo.getDeclaredMethods(), className, ownerURL);
- handleMembers(ElementType.FIELD, classInfo.getDeclaredFields(), className, ownerURL);
+ handleMembers(ElementType.FIELD, classInfo.getDeclaredFields(), className, ownerURL);
if (checkInterfaces || checkSuper)
{
@@ -105,7 +117,7 @@
* @param type where we found the annotations
* @param members the member instances
* @param className the className
- * @param ownerURL the class owner url
+ * @param ownerURL the class owner url
* @throws Exception for any annotations lookup problems
*/
protected void handleMembers(ElementType type, AnnotatedInfo[] members, String className, URL ownerURL) throws Exception
Added: projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnImplementedInterface.java
===================================================================
--- projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnImplementedInterface.java (rev 0)
+++ projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnImplementedInterface.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -0,0 +1,9 @@
+package org.jboss.test.scanning.annotations.support.jar;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+public class JarMarkOnImplementedInterface implements JarMarkOnInterface
+{
+}
Added: projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnInterface.java
===================================================================
--- projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnInterface.java (rev 0)
+++ projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/support/jar/JarMarkOnInterface.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -0,0 +1,12 @@
+package org.jboss.test.scanning.annotations.support.jar;
+
+import org.jboss.test.scanning.annotations.support.Marked;
+
+/**
+ * @author <a href="mailto:bill at burkecentral.com">Bill Burke</a>
+ * @version $Revision: 1 $
+ */
+ at Marked
+public interface JarMarkOnInterface
+{
+}
Modified: projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/test/AnnotationsScanningTestCase.java
===================================================================
--- projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/test/AnnotationsScanningTestCase.java 2010-06-15 15:45:01 UTC (rev 106055)
+++ projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/annotations/test/AnnotationsScanningTestCase.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -21,9 +21,14 @@
*/
package org.jboss.test.scanning.annotations.test;
+import junit.framework.Test;
import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.scanning.annotations.spi.AnnotationIndex;
+import org.jboss.test.scanning.annotations.support.Marked;
+import org.jboss.test.scanning.annotations.support.jar.JarMarkOnImplementedInterface;
+import org.junit.Assert;
-import junit.framework.Test;
+import java.util.Set;
/**
* @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
@@ -47,11 +52,17 @@
protected void assertJar(DeploymentUnit jar)
{
- assertAnnotations(jar, 4, 1, 1);
+ assertAnnotations(jar, 5, 1, 1);
+ AnnotationIndex env = jar.getAttachment(AnnotationIndex.class);
+ Set<String> classes = env.classesImplementingInterfacesAnnotatedWith(Marked.class.getName());
+ Assert.assertEquals(1, classes.size());
+ Assert.assertEquals(JarMarkOnImplementedInterface.class.getName(), classes.iterator().next());
+
+
}
protected void assertWar(DeploymentUnit war)
{
- assertAnnotations(war, 5, 1, 1);
+ assertAnnotations(war, 5, 1, 1);
}
}
Modified: projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/metadata/test/ScanningUnitTestCase.java
===================================================================
--- projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/metadata/test/ScanningUnitTestCase.java 2010-06-15 15:45:01 UTC (rev 106055)
+++ projects/scanning/trunk/testsuite/src/test/java/org/jboss/test/scanning/metadata/test/ScanningUnitTestCase.java 2010-06-15 15:49:13 UTC (rev 106056)
@@ -22,8 +22,7 @@
package org.jboss.test.scanning.metadata.test;
-import java.util.Set;
-
+import junit.framework.Test;
import org.jboss.classloader.plugins.ClassLoaderUtils;
import org.jboss.classloading.spi.visitor.ResourceFilter;
import org.jboss.deployers.structure.spi.DeploymentUnit;
@@ -37,7 +36,7 @@
import org.jboss.vfs.VFS;
import org.jboss.vfs.VirtualFile;
-import junit.framework.Test;
+import java.util.Set;
/**
* Test if scanning recurse filter work.
@@ -60,11 +59,11 @@
{
VirtualFile jar = VFS.getChild(getName()).getChild("simple.jar");
createAssembledDirectory(jar)
- .addPackage(JarMarkOnClassImpl.class)
- .addPackage(JarMarkOnClass.class)
- .addPackage(WebMarkOnClass.class)
- .addPackage(WebMarkOnClassImpl.class)
- .addPath("/metadata/recurse_filter");
+ .addPackage(JarMarkOnClassImpl.class)
+ .addPackage(JarMarkOnClass.class)
+ .addPackage(WebMarkOnClass.class)
+ .addPackage(WebMarkOnClassImpl.class)
+ .addPath("/metadata/recurse_filter");
DeploymentUnit unit = assertDeploy(jar);
SingletonVisitor visitor = SingletonVisitor.INSTANCE;
@@ -78,7 +77,7 @@
String jarPckg = ClassLoaderUtils.packageNameToPath(JarMarkOnClass.class.getName());
assertTrue(filtered.contains(jarPckg));
Set<String> visited = visitor.getVisited();
- assertEquals(5, visited.size());
+ assertEquals(7, visited.size());
}
finally
{
@@ -91,16 +90,16 @@
{
VirtualFile jar = VFS.getChild(getName()).getChild("simple.jar");
createAssembledDirectory(jar)
- .addPackage(JarMarkOnClassImpl.class)
- .addPackage(JarMarkOnClass.class)
- .addPath("/metadata/recurse_resources");
+ .addPackage(JarMarkOnClassImpl.class)
+ .addPackage(JarMarkOnClass.class)
+ .addPath("/metadata/recurse_resources");
DeploymentUnit unit = assertDeploy(jar);
SingletonVisitor visitor = SingletonVisitor.INSTANCE;
try
{
Set<String> visited = visitor.getVisited();
- assertEquals(7, visited.size());
+ assertEquals(9, visited.size());
}
finally
{
More information about the jboss-cvs-commits
mailing list