Return-Path: Delivered-To: apmail-openwebbeans-commits-archive@www.apache.org Received: (qmail 95634 invoked from network); 23 Mar 2011 19:09:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Mar 2011 19:09:25 -0000 Received: (qmail 50339 invoked by uid 500); 23 Mar 2011 18:09:41 -0000 Delivered-To: apmail-openwebbeans-commits-archive@openwebbeans.apache.org Received: (qmail 50324 invoked by uid 500); 23 Mar 2011 18:09:41 -0000 Mailing-List: contact commits-help@openwebbeans.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwebbeans.apache.org Delivered-To: mailing list commits@openwebbeans.apache.org Received: (qmail 50316 invoked by uid 99); 23 Mar 2011 18:09:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 18:09:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Mar 2011 18:09:39 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7E86623888CE; Wed, 23 Mar 2011 18:09:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1084657 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java Date: Wed, 23 Mar 2011 18:09:17 -0000 To: commits@openwebbeans.apache.org From: gpetracek@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110323180917.7E86623888CE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gpetracek Date: Wed Mar 23 18:09:17 2011 New Revision: 1084657 URL: http://svn.apache.org/viewvc?rev=1084657&view=rev Log: OWB-519 fix for refactored annotation scanner Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java?rev=1084657&r1=1084656&r2=1084657&view=diff ============================================================================== --- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java (original) +++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java Wed Mar 23 18:09:17 2011 @@ -294,18 +294,18 @@ public class AnnotationDB implements Ser String jarUrlPath = isJarUrl(urlPath); if (jarUrlPath != null) { - it = new JarIterator((new URL(jarUrlPath)).openStream(), filter); + it = new JarIterator((new URL(ensureCorrectUrlFormat(jarUrlPath))).openStream(), filter); } else { - File f = new File( (new URL(urlPath)).getFile() ); + File f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() ); if (!f.exists()) { // try a fallback if the URL contains %20 -> spaces if (urlPath.contains("%20")) { urlPath = urlPath.replaceAll("%20", " "); - f = new File( (new URL(urlPath)).getFile() ); + f = new File( (new URL(ensureCorrectUrlFormat(urlPath))).getFile() ); } } @@ -527,4 +527,13 @@ public class AnnotationDB implements Ser } } + private String ensureCorrectUrlFormat(String url) + { + //fix for wls + if(!url.startsWith("file:/")) + { + url = "file:/" + url; + } + return url; + } }