You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2011/03/21 15:57:41 UTC
svn commit: r1083814 -
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java
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);
}