<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Deepak,<div class=""><br class=""></div><div class="">Roger is right about  trying to avoid the extra copy.  Sorry I did not point that out previously.</div><div class=""><br class=""></div><div class="">WRT using 47 vs ‘/‘,  given that the rest of ZipFileSystem uses ‘/‘, it would be best keep  the usage consistent within the class.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Lance</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 27, 2018, at 4:51 AM, Deepak Kejriwal <<a href="mailto:deepak.kejriwal@oracle.com" class="">deepak.kejriwal@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi nio-dev team,<br class=""><br class=""><br class=""><br class="">Gentle reminder for review of below fix.<br class=""><br class=""><br class=""><br class="">Regards,<br class=""><br class="">Deepak <br class=""><br class=""><br class=""><br class="">From: Deepak Kejriwal <<a href="mailto:deepak.kejriwal@oracle.com" class="">deepak.kejriwal@oracle.com</a>> <br class="">Sent: Thursday, November 8, 2018 12:17 AM<br class="">To: '<a href="mailto:nio-dev@openjdk.java.net" class="">nio-dev@openjdk.java.net</a>' <<a href="mailto:nio-dev@openjdk.java.net" class="">nio-dev@openjdk.java.net</a>><br class="">Subject: RFR: JDK-8197398 (zipfs) OutOfMemoryError when talking contents of empty JAR file<br class=""><br class=""><br class=""><br class="">Hi all,<br class=""><br class=""><br class=""><br class="">Please help review the changes for JDK-8199776 to JDK8u:-<br class=""><br class=""><br class=""><br class="">Master Bug: <a href="https://bugs.openjdk.java.net/browse/JDK-8199776" class="">https://bugs.openjdk.java.net/browse/JDK-8199776</a> <br class=""><br class="">Webrev: <a href="http://cr.openjdk.java.net/~rpatil/8199776/webrev.00/" class="">http://cr.openjdk.java.net/~rpatil/8199776/webrev.00/</a><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">Background:-<br class=""><br class="">The Files.walkFileTree walk indefinitely while processing JAR file with "/" as a directory inside. <br class=""><br class=""><br class=""><br class="">Proposed fix:<br class=""><br class=""><br class=""><br class="">Files.walkFileTree api for jar internally uses ZipfileSystem. While iterating over the zip entries we have added a check to see if entry name is equal to "/" (absolute path). If the entry name is equal to "/" we don't add it to "inodes" map so that we don't end up with infinite loop.<br class=""><br class=""><br class=""><br class="">We have similar bug HYPERLINK "<a href="https://bugs.openjdk.java.net/browse/JDK-8197398" class="">https://bugs.openjdk.java.net/browse/JDK-8197398</a>"JDK-8197398 fixed in jdk 12. Below is the difference between fix for jdk 12 and jdk 8:-<br class=""><br class="">The fix for above issue for jdk 12 handle a case where we can update an existing entry in jar with "/" (absolute path).  As in case of jdk 8 we cannot update the existing zipentry as doing so we get "FileAlreadyExistsException". Therefore, fix for jdk 8u does not consider this case.<br class=""><br class=""><br class=""><br class="">Regards,<br class=""><br class="">Deepak<br class=""><br class=""><br class=""></div></div></blockquote></div><br class=""><div class="">
<div class=""><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; "><a href="http://oracle.com/us/design/oracle-email-sig-198324.gif" class=""><span><img apple-inline="yes" id="2BE46496-EFC5-4D35-BB90-117EF266399D" src="cid:E1C4E2F0-ECD0-4C9D-ADB4-B16CA7BCB7FC@home" class=""></span></a><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; " class=""><a href="http://oracle.com/us/design/oracle-email-sig-198324.gif" class=""><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; "></span></span></a><a href="http://oracle.com/us/design/oracle-email-sig-198324.gif" class=""><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; border-spacing: 0px; -webkit-text-decorations-in-effect: none;  "><span class="Apple-style-span" style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; border-spacing: 0px; -webkit-text-decorations-in-effect: none;  "></span></span></span></a><a href="http://oracle.com/us/design/oracle-email-sig-198324.gif" class=""><br class=""></a><span style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class="">Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037</span><br style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class=""><font color="#FF0000" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class="">Oracle</font><span style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class=""> Java Engineering </span><br style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class=""><span style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class="">1 Network Drive </span><br style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class=""><span style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class="">Burlington, MA 01803</span><br style="color: rgb(102, 102, 102); font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class=""><a href="mailto:Lance.Andersen@oracle.com" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; " class="">Lance.Andersen@oracle.com</a></div><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; " class=""><br class=""></div><br class="Apple-interchange-newline">
</span></span></div>
</div><br class=""></div></body></html>