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;
}