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/05/31 12:46:12 UTC
svn commit: r1129608 -
/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/corespi/scanner/AnnotationDB.java
Author: struberg
Date: Tue May 31 10:46:12 2011
New Revision: 1129608
URL: http://svn.apache.org/viewvc?rev=1129608&view=rev
Log:
OWB-577 fix broken JAR Url detection on WebSphere
thanks to Udo Schnurpfeil (apacheId:lofwyr) fot submitting this patch!
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=1129608&r1=1129607&r2=1129608&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 Tue May 31 10:46:12 2011
@@ -326,9 +326,11 @@ public class AnnotationDB implements Ser
*/
private String isJarUrl(String urlPath)
{
- if (urlPath.endsWith("!/") && urlPath.length() > 6)
+ // common prefixes of the url are: jar: (tomcat), zip: (weblogic) and wsjar: (websphere)
+ final int jarColon = urlPath.indexOf(':');
+ if (urlPath.endsWith("!/") && jarColon > 0)
{
- urlPath = urlPath.substring(4, urlPath.length() - 2);
+ urlPath = urlPath.substring(jarColon + 1, urlPath.length() - 2);
return urlPath;
}