[Patch] 6502392 Invalid relative names for Filer.createResource and Filer.getResource
Emil Andreas Siemes
digitalemil at yahoo.de
Fri Jan 2 14:31:11 PST 2009
com.sun.tools.javac.file.JavacFileManager checks if a name fulfills
the requirements of relative names:
"A relative name is a non-null, non-empty sequence of path segments
separated by '/'; '.' and '..' are invalid path segments. A valid
relative name must match the "path-rootless" rule of RFC 3986, section
3.3."
This is done via the isRelativeUri() method. Unfortunately this method
doesn't currently really check for path-rootless compliance. A patch
with an improved method is attached.
When java.net.Uri eventually supports RFC 3986 the need for
isRelativeUri() goes away. I would also like to propose to rename
isRelativeUri() to isRF3986PathRootless() which would more clearly
describe what the method does.
There is a comment in JavacFileManager in a couple of lines:
//FIX ME 6419701
but I don't find bug 6419701 in the bug database. Any thoughts?
Thanks
Emil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20090102/510acf8f/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JavacFileManager.diff
Type: application/octet-stream
Size: 3624 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20090102/510acf8f/JavacFileManager.diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20090102/510acf8f/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestFor6502392.java
Type: application/octet-stream
Size: 1401 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20090102/510acf8f/TestFor6502392.java
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20090102/510acf8f/attachment-0002.html
More information about the compiler-dev
mailing list