Author: epbernard
Date: 2007-08-09 15:56:35 -0400 (Thu, 09 Aug 2007)
New Revision: 12912
Modified:
trunk/HibernateExt/entitymanager/src/java/org/hibernate/ejb/packaging/JarVisitor.java
Log:
EJB-308 Container cl.getResources does not escape spaces properly
Modified:
trunk/HibernateExt/entitymanager/src/java/org/hibernate/ejb/packaging/JarVisitor.java
===================================================================
---
trunk/HibernateExt/entitymanager/src/java/org/hibernate/ejb/packaging/JarVisitor.java 2007-08-09
19:54:17 UTC (rev 12911)
+++
trunk/HibernateExt/entitymanager/src/java/org/hibernate/ejb/packaging/JarVisitor.java 2007-08-09
19:56:35 UTC (rev 12912)
@@ -60,7 +60,7 @@
//Original URL is like jar:protocol
jarUrl = new URL( file );
if ( "file".equals( jarUrl.getProtocol() ) ) {
- //Do some voodoo magic because WAS doesn't think escaping URL is an interesting
feature
+ //not escaped, need to voodoo
if ( file.indexOf( ' ' ) != -1 ) {
//not escaped, need to voodoo
jarUrl = new File( jarUrl.getFile() ).toURI().toURL(); //goes by toURI to escape
the path
@@ -68,9 +68,9 @@
} //otherwise left as is
}
else if ( "zip".equals( protocol ) //Weblogic has it's own way
- || "code-source".equals( url.getProtocol() ) ) { //OC4J prevent ejb.jar
access (ie everything without path)
+ || "code-source".equals( url.getProtocol() ) //OC4J prevent ejb.jar access
(ie everything without path)
+ || "file".equals( protocol ) ) { //if no wrapping is done
//we have extracted the zip file, so it should be read as a file
- //Just in case some containers are as stupid as WAS: luckily WAS is closed source so
nobody will dupe the bug
if ( file.indexOf( ' ' ) != -1 ) {
//not escaped, need to voodoo
jarUrl = new File(file).toURI().toURL(); //goes by toURI to escape the path
@@ -93,7 +93,7 @@
}
/**
- * Build a JarVisitor on the given JAR URL applying th given filters
+ * Build a JarVisitor on the given JAR URL applying the given filters
*
* @throws IllegalArgumentException if the URL is malformed
*/
Show replies by date