<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi,<br>
<br>
Our download manager <a class="moz-txt-link-freetext"
href="http://jdownloader.org/">http://jdownloader.org/</a> has
millions of customers.<br>
Some of them also suffered from the 13 year old bug <a
class="moz-txt-link-freetext"
href="http://bugs.java.com/view_bug.do?bug_id=4523159"><a class="moz-txt-link-freetext" href="http://bugs.java.com/view_bug.do?bug_id=4523159">http://bugs.java.com/view_bug.do?bug_id=4523159</a></a>.<br>
The issue happens because '!/' is used as seperator between a jar
file and its content in URLStreamHandler and JarURLConnection.<br>
<br>
I hereby want to suggest our bugfix.<br>
<br>
It consists of a modified sun.net.www.protocol.jar.Handler and
sun.net.www.protocol.jar.JarURLConnection.<br>
Instead of searching for '!/' and using the first hit, our
customized sun.net.www.protocol.jar.Handler loops through
URL.getFile()<br>
via indexof and substring and tests if it specifies the actual jar
file on disk. <br>
In case the path contains '!/' we return a customized
sun.net.www.protocol.jar.JarURLConnection that overrides<br>
getJarFileURL(),getJarEntry(),getEntryName() to provide the correct
information.<br>
<br>
The one disadvantage of this bugfix is the additional IO introduced
by File.exits(), but that can be <span class="st">considered<em> </em>neglectable<em>.</em></span><br>
<br>
Please find attached our customized classes.<br>
<br>
Best Regards<br>
Daniel Wilhelm<br>
<br>
PS: <a class="moz-txt-link-abbreviated" href="mailto:sean.coffey@oracle.com/sean.coffey@oracle.com">sean.coffey@oracle.com/sean.coffey@oracle.com</a> told me to post
this to net-dev<br>
<pre class="moz-signature" cols="72">--
-----------------------------------------------
Daniel Wilhelm
CTO, Co-Founder
Appwork GmbH
T: +49 (911)97923112 (Mo-Fr 9:00 - 17:00 CET)
Schwabacherstraße 117, 90763 Fürth, Germany</pre>
</body>
</html>