tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1296920 - in /openejb/trunk/openejb/container/openejb-core/src: main/java/org/apache/openejb/config/ConfigurableClasspathArchive.java test/java/org/apache/openejb/config/scanning/AbstractXmlAnnotationFinderTest.java
Date Mon, 05 Mar 2012 01:12:00 GMT
Author: rmannibucau
Date: Mon Mar  5 01:11:59 2012
New Revision: 1296920

URL: http://svn.apache.org/viewvc?rev=1296920&view=rev
Log:
fixing test compile error

Modified:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurableClasspathArchive.java
    openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/scanning/AbstractXmlAnnotationFinderTest.java

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurableClasspathArchive.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurableClasspathArchive.java?rev=1296920&r1=1296919&r2=1296920&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurableClasspathArchive.java
(original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurableClasspathArchive.java
Mon Mar  5 01:11:59 2012
@@ -133,13 +133,17 @@ public class ConfigurableClasspathArchiv
             this(loader, Collections.EMPTY_MAP);
         }
 
-        public FakeModule(final ClassLoader loader, final Map<String, Object> altDD)
{
+        public FakeModule(final ClassLoader loader, final Map<String, Object> altDD)
 {
+            this(loader, altDD, System.getProperty(SCAN_XML_PROPERTY, SCAN_XML_NAME));
+        }
+
+        public FakeModule(final ClassLoader loader, final Map<String, Object> altDD,
final String name) {
             super(false);
             setClassLoader(loader);
 
-            URL scanXml = (URL) altDD.get(SCAN_XML_NAME);
+            URL scanXml = (URL) altDD.get(name);
             if (scanXml == null) {
-                scanXml = loader.getResource(SCAN_XML_NAME);
+                scanXml = loader.getResource(name);
             }
             if (scanXml != null) {
                 getAltDDs().put(SCAN_XML_NAME, scanXml);

Modified: openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/scanning/AbstractXmlAnnotationFinderTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/scanning/AbstractXmlAnnotationFinderTest.java?rev=1296920&r1=1296919&r2=1296920&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/scanning/AbstractXmlAnnotationFinderTest.java
(original)
+++ openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/scanning/AbstractXmlAnnotationFinderTest.java
Mon Mar  5 01:11:59 2012
@@ -1,6 +1,7 @@
 package org.apache.openejb.config.scanning;
 
 import org.apache.openejb.config.ConfigurableClasspathArchive;
+import org.apache.openejb.config.ScanConstants;
 import org.apache.openejb.config.scanning.bean.MyAnnotation;
 import org.apache.openejb.config.scanning.bean.MyBean1;
 import org.apache.openejb.config.scanning.bean.MyBean2;
@@ -18,13 +19,13 @@ import java.util.List;
 
 import static org.junit.Assert.assertEquals;
 
-public abstract class AbstractXmlAnnotationFinderTest {
+public abstract class AbstractXmlAnnotationFinderTest implements ScanConstants {
     protected IAnnotationFinder finder;
 
     @Before
     public void initFinder() throws Exception {
         final ClassLoader loader = Thread.currentThread().getContextClassLoader();
-        System.setProperty("openejb.scan.xml.name", scanXml());
+        System.setProperty(SCAN_XML_PROPERTY, scanXml());
         finder = new AnnotationFinder(new ConfigurableClasspathArchive(loader,
                 Arrays.asList(
                         new URL(loader.getResource(scanXml()).toExternalForm().replace(scanXml(),
""))



Mime
View raw message