openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1298980 - /openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/scanner/WebScannerService.java
Date Fri, 09 Mar 2012 18:58:07 GMT
Author: struberg
Date: Fri Mar  9 18:58:07 2012
New Revision: 1298980

URL: http://svn.apache.org/viewvc?rev=1298980&view=rev
Log:
use constant instead of redundant META-INF/beans.xml String

Modified:
    openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/scanner/WebScannerService.java

Modified: openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/scanner/WebScannerService.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/scanner/WebScannerService.java?rev=1298980&r1=1298979&r2=1298980&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/scanner/WebScannerService.java
(original)
+++ openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/web/scanner/WebScannerService.java
Fri Mar  9 18:58:07 2012
@@ -98,9 +98,10 @@ public class WebScannerService extends A
     protected Set<String> createURLFromMarkerFile() throws Exception
     {
         Set<String> listURL = new HashSet<String>();
+        ClassLoader parentClassLoader = WebBeansUtil.getCurrentClassLoader().getParent();
 
         // Root with beans.xml marker.
-        String[] urls = findBeansXmlBases("META-INF/beans.xml", WebBeansUtil.getCurrentClassLoader());
+        String[] urls = findBeansXmlBases(META_INF_BEANS_XML, WebBeansUtil.getCurrentClassLoader());
 
         if (urls != null)
         {
@@ -110,14 +111,12 @@ public class WebScannerService extends A
                 String fileDir = new URL(url).getFile();
                 if (fileDir.endsWith(".jar!/"))
                 {
-                    fileDir = fileDir.substring(0, fileDir.lastIndexOf("/")) + "/META-INF/beans.xml";
+                    fileDir = fileDir.substring(0, fileDir.lastIndexOf("/")) + "/" + META_INF_BEANS_XML;
 
                     //fix for weblogic
                     if (!fileDir.startsWith("file:/"))
                     {
                         fileDir = "file:/" + fileDir;
-                        //TODO switch to a more stable approach
-                        //url = new URL("jar:" + fileDir);
                     }
 
                     if (logger.wblWillLogDebug())



Mime
View raw message