Bug 42222 - Locator implementation not encoding URI strings properly: spaces in paths
Locator implementation not encoding URI strings properly: spaces in paths
Status: RESOLVED FIXED
Product: Ant
Classification: Unclassified
Component: Core
1.7.0
Other other
: P2 regression with 6 votes (vote)
: 1.7.1
Assigned To: Ant Notifications List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-04-24 08:16 UTC by Darin Swanson
Modified: 2014-02-17 13:51 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Swanson 2007-04-24 08:16:48 UTC
Locator.fromURI does not correctly encode a string that contains spaces.
The following stack trace is one of the possibilities:

java.lang.IllegalArgumentException
at java.net.URI.create(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.tools.ant.launch.Locator.fromURI(Locator.java:162)
at org.apache.tools.ant.launch.Locator.getResourceSource(Locator.java:119)
at org.apache.tools.ant.launch.Locator.getClassSource(Locator.java:90)
at org.apache.tools.ant.Project.setAntLib(Project.java:313)
at org.apache.tools.ant.Project.initProperties(Project.java:309)
at org.apache.tools.ant.Project.init(Project.java:295)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:520)
at
org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:377)
at
org.eclipse.pde.internal.core.exports.FeatureExportOperation.cleanup(FeatureExportOperation.java:576)
at
org.eclipse.pde.internal.core.exports.ProductExportOperation.run(ProductExportOperation.java:112)
at
org.eclipse.pde.internal.ui.build.FeatureExportJob.run(FeatureExportJob.java:55)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.net.URISyntaxException: Illegal character in path at index 18:
file:/C:/Documents and
Settings/eclipse/eclipse/plugins/org.apache.ant_1.7.0/lib/ant.jar
at java.net.URI$Parser.fail(Unknown Source)
at java.net.URI$Parser.checkChars(Unknown Source)
at java.net.URI$Parser.parseHierarchical(Unknown Source)
at java.net.URI$Parser.parse(Unknown Source)
at java.net.URI.<init>(Unknown Source)
Comment 1 Darin Swanson 2007-05-11 06:12:51 UTC
Is there any chance of a "rollup" fix for this problem in a short timeframe?
My understanding is that the problem is fixed in the 1.7.1 stream.

We are getting close to the Europa (3.3) release for Eclipse and this a major
problem for us with Ant 1.7.0.
Comment 2 Steve Loughran 2007-05-11 06:42:37 UTC
Darin, 
are you proposing we should backport a fix whose library is still stabilising
and ship a new ant release without going through a public beta cycle?
Comment 3 Darin Swanson 2007-05-11 07:21:07 UTC
I am hoping for something like Ant 1.7.0.1 to fix the bug introduced in the
Locator class.
I do not I understand the stabilization point.
Comment 4 Steve Loughran 2007-05-11 07:55:11 UTC
Locator is failing in the ant tests as we've found some paths that cause the
branch of the code that uses the java.net.URI class to fail. That's what I mean
by stabilising. 
Comment 5 Chris Torrence 2007-05-11 10:33:06 UTC
Just wanted to echo Darin's plea to fix this in time for Eclipse 3.3. This is
breaking our nightly tests on Windows of our Eclipse RCP application. Our
workaround is to install the app in a non-default location like C:/temp, but
that is definitely not ideal.
Comment 6 Mathew Reno 2007-05-11 11:00:01 UTC
I am also hoping for a quick fix to this problem so we can continue to use 
Eclipse 3.3 for our plug-in development.
Comment 7 Darin Swanson 2007-05-11 12:02:01 UTC
Eclipse bug for reference:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=183283
Comment 8 Darin Swanson 2007-05-11 12:05:41 UTC
sorry...did not mean to remove the regression severity
Comment 9 Steve Loughran 2007-05-22 13:33:38 UTC
Fixed in Ant1.7.1