openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1083814 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java
Date Mon, 21 Mar 2011 14:57:41 GMT
Author: struberg
Date: Mon Mar 21 14:57:41 2011
New Revision: 1083814

URL: http://svn.apache.org/viewvc?rev=1083814&view=rev
Log:
OWB-524 workaround for broken URL which contains %20 for spaces

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=1083814&r1=1083813&r2=1083814&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
Mon Mar 21 14:57:41 2011
@@ -298,8 +298,17 @@ public class AnnotationDB implements Ser
         }
         else
         {
-            //X TODO check %20 for spaces ...
             File f = new File( (new URL(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() );
+                }
+
+            }
             it = new FileIterator(f, filter);
         }
 



Mime
View raw message