Summary: | Configuration properties not evaluated correctly if @user.home is used and the user id contains a "#". | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Nalini Ganapati <nalinig> |
Component: | Runtime | Assignee: | platform-runtime-inbox <platform-runtime-inbox> |
Status: | CLOSED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | robin.tegg, sptaszkiewicz |
Version: | 3.4 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Nalini Ganapati
2009-11-18 18:58:43 EST
Cause appears to be in the LocationManager.initialiseLocations() method The issue is caused the way that Eclipse internally creates Location objects from URLs. “# ? &“ are all special characters within URLs. Below is an example of constructing a URL with a user’s directory, whose name includes a “#” char URL url = new File( new File( "c:\\documents and settings" ), "#robin" ).toURL(); // eclipse uses this method for storing the location System.out.println( "File:" + url.getFile() ); // these are other parts so you can see where the #robin user name // goes. obviously this will affect any user name with a #?& and any // other non-escaped special URL character System.out.println( "Query:" + url.getQuery() ); System.out.println( "Path:" + url.getPath() ); System.out.println( "Ref:" + url.getRef() ); Output: File:/c:/documents and settings/ Query:null Path:/c:/documents and settings/ Ref:robin The user name gets stored as the “.ref” part of the URL. Eclipse uses the url.getFile() method, which does not include the ref, when creating the User Location used in the tool. The two classes causing the headaches are LocationManager.buildLocation() (line 155) and BasicLocation.setURL() (121). This is a known issue and documented in the README that is shipped with the SDK. See also bug 312772. *** This bug has been marked as a duplicate of bug 3109 *** |