[jboss-cvs] JBossAS SVN: r95402 - projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 22 09:35:33 EDT 2009
Author: alesj
Date: 2009-10-22 09:35:32 -0400 (Thu, 22 Oct 2009)
New Revision: 95402
Modified:
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationEnvTestCase.java
projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationsTest.java
Log:
Make tests see javassist.
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationEnvTestCase.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationEnvTestCase.java 2009-10-22 13:20:17 UTC (rev 95401)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationEnvTestCase.java 2009-10-22 13:35:32 UTC (rev 95402)
@@ -66,7 +66,8 @@
deployment.getName(),
null,
ClassLoaderUtils.classNameToPath("org.jboss.test.deployers.annotations.support.AnnotationsHolder"),
- ClassLoaderUtils.classNameToPath("org.jboss.test.deployers.annotations.support.TestAnnotation")
+ ClassLoaderUtils.classNameToPath("org.jboss.test.deployers.annotations.support.TestAnnotation"),
+ ClassLoaderUtils.classNameToPath("org.jboss.reflect.plugins.javassist.JavassistMethod")
);
DeploymentUnit unit = assertDeploy(deployer, deployment);
@@ -143,7 +144,8 @@
deployment.getName(),
null,
ClassLoaderUtils.classNameToPath("org.jboss.test.deployers.annotations.support.AnnotationsHolder"),
- ClassLoaderUtils.classNameToPath("org.jboss.test.deployers.annotations.support.TestAnnotation")
+ ClassLoaderUtils.classNameToPath("org.jboss.test.deployers.annotations.support.TestAnnotation"),
+ ClassLoaderUtils.classNameToPath("org.jboss.reflect.plugins.javassist.JavassistMethod")
);
DeploymentUnit unit = assertDeploy(deployer, deployment);
Modified: projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationsTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationsTest.java 2009-10-22 13:20:17 UTC (rev 95401)
+++ projects/jboss-deployers/trunk/deployers-impl/src/test/java/org/jboss/test/deployers/annotations/test/AnnotationsTest.java 2009-10-22 13:35:32 UTC (rev 95402)
@@ -27,6 +27,9 @@
import org.jboss.classloader.spi.ClassLoaderSystem;
import org.jboss.classloader.spi.ParentPolicy;
+import org.jboss.classloader.spi.filter.ClassFilter;
+import org.jboss.classloader.spi.filter.PackageClassFilter;
+import org.jboss.classloader.plugins.filter.CombiningClassFilter;
import org.jboss.classloading.spi.dependency.ClassLoading;
import org.jboss.classloading.spi.dependency.policy.mock.MockClassLoadingMetaData;
import org.jboss.classloading.spi.metadata.CapabilitiesMetaData;
@@ -163,7 +166,11 @@
{
ClassLoading classLoading = new ClassLoading();
ClassLoaderSystem system = new InterceptionClassLoaderSystem();
- system.getDefaultDomain().setParentPolicy(ParentPolicy.BEFORE_BUT_JAVA_ONLY);
+ // we need to see javassist
+ ClassFilter javassistFilter = new PackageClassFilter(new String[]{"org.jboss.reflect.plugins.javassist"});
+ ClassFilter before = new CombiningClassFilter(false, new ClassFilter[]{ClassFilter.JAVA_ONLY, javassistFilter});
+ ParentPolicy parentPolicy = new ParentPolicy(before, ClassFilter.NOTHING);
+ system.getDefaultDomain().setParentPolicy(parentPolicy);
deployer1 = new MockClassLoaderDescribeDeployer();
deployer1.setClassLoading(classLoading);
@@ -192,6 +199,7 @@
GenericAnnotationDeployer deployer = new GenericAnnotationDeployer();
DefaultConfiguration configuration = new DefaultConfiguration();
configuration.setTypeInfoProvider(new JavassistTypeInfoProvider());
+ configuration.setForceAnnotations(true);
deployer.setConfiguration(configuration);
return deployer;
}
More information about the jboss-cvs-commits
mailing list