[jboss-cvs] JBossAS SVN: r76142 - in projects/jboss-mdr/trunk: src/main/org/jboss/metadata/plugins/loader/reflection and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 23 13:46:18 EDT 2008


Author: adrian at jboss.org
Date: 2008-07-23 13:46:18 -0400 (Wed, 23 Jul 2008)
New Revision: 76142

Modified:
   projects/jboss-mdr/trunk/.classpath
   projects/jboss-mdr/trunk/pom.xml
   projects/jboss-mdr/trunk/src/main/org/jboss/metadata/plugins/loader/reflection/AnnotatedElementMetaDataLoader.java
   projects/jboss-mdr/trunk/src/tests/org/jboss/test/metadata/loader/reflection/test/ReflectionMetaDataLoaderTestSuite.java
Log:
Fix the missing log4j from the tests by upgrading to jboss-test 1.1.0

Modified: projects/jboss-mdr/trunk/.classpath
===================================================================
--- projects/jboss-mdr/trunk/.classpath	2008-07-23 17:15:51 UTC (rev 76141)
+++ projects/jboss-mdr/trunk/.classpath	2008-07-23 17:46:18 UTC (rev 76142)
@@ -3,10 +3,17 @@
   <classpathentry kind="src" path="src/tests" output="target/test-classes"/>
   <classpathentry kind="output" path="target/classes"/>
   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/javassist/3.7.1.GA/javassist-3.7.1.GA.jar" sourcepath="M2_REPO/org/jboss/javassist/3.7.1.GA/javassist-3.7.1.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.5.GA/jboss-common-core-2.2.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
   <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12-sources.jar"/>
-  <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-test/1.0.5.GA/jboss-test-1.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-test/1.0.5.GA/jboss-test-1.0.5.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.0.GA/jboss-server-manager-0.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.0.GA/jboss-server-manager-0.1.0.GA-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.0.GA/jboss-test-1.1.0.GA.jar" sourcepath="M2_REPO/org/jboss/test/jboss-test/1.1.0.GA/jboss-test-1.1.0.GA-sources.jar"/>
   <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
+  <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
 </classpath>
\ No newline at end of file

Modified: projects/jboss-mdr/trunk/pom.xml
===================================================================
--- projects/jboss-mdr/trunk/pom.xml	2008-07-23 17:15:51 UTC (rev 76141)
+++ projects/jboss-mdr/trunk/pom.xml	2008-07-23 17:46:18 UTC (rev 76142)
@@ -97,47 +97,13 @@
       <version>2.2.5.GA</version>
     </dependency>
     <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <version>1.1.0.GA</version>
+      <scope>test</scope>
+    </dependency>
     <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-test</artifactId>
-      <version>1.0.5.GA</version>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jboss-common-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-spi</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>jboss.profiler.jvmti</groupId>
-          <artifactId>jboss-profiler-jvmti</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>log4j</groupId>
-          <artifactId>log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>junit</groupId>
-          <artifactId>junit</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ant</groupId>
-          <artifactId>ant</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.ant</groupId>
-          <artifactId>ant-junit</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.4</version>

Modified: projects/jboss-mdr/trunk/src/main/org/jboss/metadata/plugins/loader/reflection/AnnotatedElementMetaDataLoader.java
===================================================================
--- projects/jboss-mdr/trunk/src/main/org/jboss/metadata/plugins/loader/reflection/AnnotatedElementMetaDataLoader.java	2008-07-23 17:15:51 UTC (rev 76141)
+++ projects/jboss-mdr/trunk/src/main/org/jboss/metadata/plugins/loader/reflection/AnnotatedElementMetaDataLoader.java	2008-07-23 17:46:18 UTC (rev 76142)
@@ -124,64 +124,36 @@
          if (signature instanceof ConstructorSignature)
          {
             ConstructorSignature constructorSignature = (ConstructorSignature) signature;
-            try
-            {
-               Constructor<?> constructor = constructorSignature.getConstructor();
-               if (constructor == null)
-                  constructor = clazz.getConstructor(signature.getParametersTypes(clazz));
-               return new AnnotatedElementMetaDataLoader(constructor);
-            }
-            catch (NoSuchMethodException e)
-            {
-               return null;
-            }
+            Constructor<?> constructor = constructorSignature.getConstructor();
+            if (constructor == null)
+               constructor = ReflectionUtils.findConstructor(clazz, signature.getParametersTypes(clazz));
+            return new AnnotatedElementMetaDataLoader(constructor);
          }
          else if (signature instanceof MethodSignature)
          {
             MethodSignature methodSignature = (MethodSignature) signature;
-            try
-            {
-               Method method = methodSignature.getMethod();
-               if (method == null)
-                  method = clazz.getMethod(signature.getName(), signature.getParametersTypes(clazz));
-               return new AnnotatedElementMetaDataLoader(method);
-            }
-            catch (NoSuchMethodException e)
-            {
-               return null;
-            }
+            Method method = methodSignature.getMethod();
+            if (method == null)
+               method = ReflectionUtils.findMethod(clazz, signature.getName(), signature.getParametersTypes(clazz));
+            return new AnnotatedElementMetaDataLoader(method);
          }
          else if (signature instanceof MethodParametersSignature)
          {
             MethodParametersSignature methodParametersSignature = (MethodParametersSignature) signature;
-            try
-            {
-               Method method = methodParametersSignature.getMethod();
-               if (method == null)
-                  method = clazz.getMethod(signature.getName(), signature.getParametersTypes(clazz));
-               Annotation[][] paramAnnotations = method.getParameterAnnotations();
-               return new SimpleMetaDataLoader(paramAnnotations[methodParametersSignature.getParam()]);
-            }
-            catch (NoSuchMethodException e)
-            {
-               return null;
-            }
+            Method method = methodParametersSignature.getMethod();
+            if (method == null)
+               method = ReflectionUtils.findMethod(clazz, signature.getName(), signature.getParametersTypes(clazz));
+            Annotation[][] paramAnnotations = method.getParameterAnnotations();
+            return new SimpleMetaDataLoader(paramAnnotations[methodParametersSignature.getParam()]);
          }
          else if (signature instanceof ConstructorParametersSignature)
          {
             ConstructorParametersSignature constructorParametersSignature = (ConstructorParametersSignature) signature;
-            try
-            {
-               Constructor<?> constructor = constructorParametersSignature.getConstructor();
-               if (constructor == null)
-                  constructor = clazz.getConstructor(signature.getParametersTypes(clazz));
-               Annotation[][] paramAnnotations = constructor.getParameterAnnotations();
-               return new SimpleMetaDataLoader(paramAnnotations[constructorParametersSignature.getParam()]);
-            }
-            catch (NoSuchMethodException e)
-            {
-               return null;
-            }
+            Constructor<?> constructor = constructorParametersSignature.getConstructor();
+            if (constructor == null)
+               constructor = ReflectionUtils.findConstructor(clazz, signature.getParametersTypes(clazz));
+            Annotation[][] paramAnnotations = constructor.getParameterAnnotations();
+            return new SimpleMetaDataLoader(paramAnnotations[constructorParametersSignature.getParam()]);
          }
          else if (signature instanceof FieldSignature)
          {

Modified: projects/jboss-mdr/trunk/src/tests/org/jboss/test/metadata/loader/reflection/test/ReflectionMetaDataLoaderTestSuite.java
===================================================================
--- projects/jboss-mdr/trunk/src/tests/org/jboss/test/metadata/loader/reflection/test/ReflectionMetaDataLoaderTestSuite.java	2008-07-23 17:15:51 UTC (rev 76141)
+++ projects/jboss-mdr/trunk/src/tests/org/jboss/test/metadata/loader/reflection/test/ReflectionMetaDataLoaderTestSuite.java	2008-07-23 17:46:18 UTC (rev 76142)
@@ -45,7 +45,7 @@
       suite.addTest(new TestSuite(AnnotatedElementLoaderBasicAnnotationsUnitTestCase.class));
       suite.addTest(new TestSuite(AnnotatedElementLoaderComponentBasicAnnotationsUnitTestCase.class));
       suite.addTest(new TestSuite(AnnotatedElementLoaderScopeUnitTestCase.class));
-      
+//      suite.addTest(new TestSuite(AnnotatedElementLoaderNotPublicUnitTestCase.class));
       return suite;
    }
 }




More information about the jboss-cvs-commits mailing list