Community
Participate
Working Groups
Build Identifier: 20100617-1415 When I try to start the debugger with a breakpoint set in a script that contains a white-space in its path, I get the following exception: java.lang.IllegalArgumentException at java.net.URI.create(URI.java:842) at org.eclipse.wst.jsdt.debug.internal.core.breakpoints.JavaScriptBreakpoint.addToTarget(JavaScriptBreakpoint.java:152) at org.eclipse.wst.jsdt.debug.internal.core.model.JavaScriptDebugTarget.breakpointAdded(JavaScriptDebugTarget.java:811) at org.eclipse.wst.jsdt.debug.internal.core.model.JavaScriptDebugTarget.initializeBreakpoints(JavaScriptDebugTarget.java:405) at org.eclipse.wst.jsdt.debug.internal.core.model.JavaScriptDebugTarget.initialize(JavaScriptDebugTarget.java:149) at org.eclipse.wst.jsdt.debug.internal.core.model.JavaScriptDebugTarget.<init>(JavaScriptDebugTarget.java:139) at org.eclipse.wst.jsdt.debug.internal.core.launching.RemoteJavaScriptLaunchDelegate.launch(RemoteJavaScriptLaunchDelegate.java:76) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.net.URISyntaxException: Illegal character in path at index 10: scripts/My Scripts/Tool.js at java.net.URI$Parser.fail(URI.java:2809) at java.net.URI$Parser.checkChars(URI.java:2982) at java.net.URI$Parser.parseHierarchical(URI.java:3066) at java.net.URI$Parser.parse(URI.java:3024) at java.net.URI.<init>(URI.java:578) at java.net.URI.create(URI.java:840) ... 11 more Reproducible: Always
There are quite a few places where we are using URI.create(string) to create new URIs. This method does not encode special chars, we should be using URIUtil.fromString (or the like) to create our URIs.
Created attachment 173109 [details] proposed fix The patch removes the use of URI.create(..) in favour of URIUtil.fromString(..) which will encode spaces, etc. The bulk of the fix for this bug was committed with the fix for 318251 due to changes on the same LOC.
Looks good.
applied to HEAD and 3.2.1