4523159: suggestion for a bugfix for 13 year old "jars in path with !"
sean.coffey at oracle.com
Tue Sep 15 09:48:54 UTC 2015
Thanks for your investigation on this issue. Networking issues should be
discussed on the net-dev  mailing list. Please post your comments and
patch to that list.
On 15/09/2015 09:31, Daniel Wilhlem wrote:
> Our download manager http://jdownloader.org/ has millions of customers.
> Some of them also suffered from the 13 year old bug
> The issue happens because '!/' is used as seperator between a jar file
> and its content in URLStreamHandler and JarURLConnection.
> I hereby want to suggest our bugfix.
> It consists of a modified sun.net.www.protocol.jar.Handler and
> Instead of searching for '!/' and using the first hit, our customized
> sun.net.www.protocol.jar.Handler loops through URL.getFile()
> via indexof and substring and tests if it specifies the actual jar
> file on disk.
> In case the path contains '!/' we return a customized
> sun.net.www.protocol.jar.JarURLConnection that overrides
> getJarFileURL(),getJarEntry(),getEntryName() to provide the correct
> The one disadvantage of this bugfix is the additional IO introduced by
> File.exits(), but that can be considered//neglectable/./
> Please find attached our customized classes.
> Best Regards
> Daniel Wilhelm
> PS: cc'ed to jdk9-dev
More information about the jdk9-dev