openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1494176 - /openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbSWClassLoader.java
Date Tue, 18 Jun 2013 15:30:05 GMT
Author: rmannibucau
Date: Tue Jun 18 15:30:05 2013
New Revision: 1494176

URL: http://svn.apache.org/r1494176
Log:
OWB-876 virtual resource handling in arquillian - better handling of skip appclassloader

Modified:
    openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbSWClassLoader.java

Modified: openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbSWClassLoader.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbSWClassLoader.java?rev=1494176&r1=1494175&r2=1494176&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbSWClassLoader.java
(original)
+++ openwebbeans/trunk/webbeans-arquillian/owb-arquillian-standalone/src/main/java/org/apache/webbeans/arquillian/standalone/OwbSWClassLoader.java
Tue Jun 18 15:30:05 2013
@@ -73,6 +73,34 @@ public class OwbSWClassLoader extends UR
     }
 
     @Override
+    public URL getResource(final String name)
+    {
+        if (useOnlyArchiveResources)
+        {
+            final URL url = findResource(name);
+            if (url != null)
+            {
+                return url;
+            } // else user probably used the fact the test is embedded
+        }
+        return super.getResource(name);
+    }
+
+    @Override
+    public Enumeration<URL> getResources(final String name) throws IOException
+    {
+        if (useOnlyArchiveResources)
+        {
+            final Enumeration<URL> urls = findResources(name);
+            if (urls.hasMoreElements())
+            {
+                return urls;
+            } // else user probably used the fact the test is embedded
+        }
+        return super.getResources(name);
+    }
+
+    @Override
     public URL findResource(final String name)
     {
         final Node node = findNode(name);



Mime
View raw message