geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Sisson (JIRA)" <...@geronimo.apache.org>
Subject [jira] Commented: (GERONIMO-615) RMIClassLoaderSpiImpl.normalizeCodebase(..) generates MalformedURLExceptions unnecessarily
Date Thu, 24 Mar 2005 06:47:24 GMT
     [ http://issues.apache.org/jira/browse/GERONIMO-615?page=comments#action_61468 ]
     
John Sisson commented on GERONIMO-615:
--------------------------------------

Attaching patch to issue for review.

Prior to the patch over 100 MalformedURLExceptions would have been generated when processing
the following path that contains 186 space characters, 42 of those being the delimiters.

file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/ant-1.5.3-1.jar file:/C:/Program
Files/Apache Software Foundation/Maven 1.0.2/lib/ant-optional-1.5.3-1.jar file:/C:/Program
Files/Apache Software Foundation/Maven 1.0.2/lib/commons-beanutils-1.6.1.jar file:/C:/Program
Files/Apache Software Foundation/Maven 1.0.2/lib/commons-betwixt-1.0-beta-1.20030111.103454.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-cli-1.0-beta-2.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-collections-2.1.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-digester-1.4.1.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-grant-1.0-beta-4.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-graph-0.8.1.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-httpclient-2.0.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-io-20030203.000550.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-jelly-20030902.160215.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-jelly-tags-ant-1.0.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-jelly-tags-define-20030211.142932.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-jelly-tags-util-20030211.141939.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-jelly-tags-xml-20040613.030723.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-jexl-1.0-beta-1.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/commons-lang-2.0.jar file:/C:/Program
Files/Apache Software Foundation/Maven 1.0.2/lib/commons-logging-1.0.3.jar file:/C:/Program
Files/Apache Software Foundation/Maven 1.0.2/lib/dom4j-1.4-dev-8.jar file:/C:/Program Files/Apache
Software Foundation/Maven 1.0.2/lib/forehead-1.0-beta-5.jar file:/C:/Program Files/Apache
Software Foundation/Maven 1.0.2/lib/log4j-1.2.8.jar file:/C:/Program Files/Apache Software
Foundation/Maven 1.0.2/lib/maven-jelly-tags-1.0.1.jar file:/C:/Program Files/Apache Software
Foundation/Maven 1.0.2/lib/maven.jar file:/C:/Program Files/Apache Software Foundation/Maven
1.0.2/lib/plexus-0.6.jar file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/werkz-20040426.222000.jar
file:/C:/Program Files/Apache Software Foundation/Maven 1.0.2/lib/which-1.0.jar file:/C:/Program
Files/Apache Software Foundation/Maven 1.0.2/lib/endorsed/xerces-2.4.0.jar file:/C:/Program
Files/Apache Software Foundation/Maven 1.0.2/lib/endorsed/xml-apis-1.0.b2.jar file:/C:/Documents
and Settings/john/.maven/repository/geronimo/jars/geronimo-common-1.0-SNAPSHOT.jar file:/C:/Documents
and Settings/john/.maven/repository/geronimo/jars/geronimo-kernel-1.0-SNAPSHOT.jar file:/C:/Documents
and Settings/john/.maven/repository/geronimo/jars/geronimo-deployment-1.0-SNAPSHOT.jar file:/C:/Documents
and Settings/john/.maven/repository/geronimo/jars/geronimo-deploy-tool-1.0-SNAPSHOT.jar file:/C:/Documents
and Settings/john/.maven/repository/geronimo/jars/geronimo-system-1.0-SNAPSHOT.jar file:/C:/Documents
and Settings/john/.maven/repository/geronimo-spec/jars/geronimo-spec-j2ee-deployment-1.1-rc4.jar
file:/C:/Documents and Settings/john/.maven/repository/commons-cli/jars/commons-cli-1.0.jar
file:/C:/Documents and Settings/john/.maven/repository/commons-logging/jars/commons-logging-1.0.3.jar
file:/C:/Documents and Settings/john/.maven/repository/log4j/jars/log4j-1.2.8.jar file:/C:/Documents
and Settings/john/.maven/repository/mx4j/jars/mx4j-3.0.1.jar file:/C:/Documents and Settings/john/.maven/repository/mx4j/jars/mx4j-remote-3.0.1.jar
file:/C:/Documents and Settings/john/.maven/repository/cglib/jars/cglib-full-2.0.2.jar file:/C:/Documents
and Settings/john/.maven/repository/xmlbeans/jars/xbean-apache-1.0-DEV.jar file:/C:/Documents
and Settings/john/.maven/cache/geronimo-deployment-plugin-1.0-SNAPSHOT/

For example, processing the above input, an exception will be thrown for the URL("Files/Apache")
and for the URL(" ") ...

After applying my patch, with the example path shown above, no MalformedURLExceptions were
generated.  I also ensured that the normalization of spaces wasn't impacted by the patch.

> RMIClassLoaderSpiImpl.normalizeCodebase(..) generates MalformedURLExceptions unnecessarily
> ------------------------------------------------------------------------------------------
>
>          Key: GERONIMO-615
>          URL: http://issues.apache.org/jira/browse/GERONIMO-615
>      Project: Geronimo
>         Type: Bug
>     Reporter: John Sisson
>     Assignee: Gianny DAMOUR
>     Priority: Trivial

>
> org.apache.geronimo.system.rmi.RMIClassLoaderSpiImpl.normalizeCodebase(..) unnecessarily
causes MalformedURLExceptions to be generated and caught.
> The exceptions are due to the delimiter tokens (e.g. a space character) being passed
to the URL constructor.  
> This occurs because "true" flag being passed on the call to the StringTokenizer constructor
in the body of the normalizeCodebase method(..).
> In my debug session, in one invocation of normalizeCodebase(..), over 40 MalformedURLExceptions
were generated.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message