<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 13, 2020, at 1:53 PM, Alan Bateman <<a href="mailto:Alan.Bateman@oracle.com" class="">Alan.Bateman@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 13/01/2020 10:31, Jaikiran Pai wrote:<br class=""><blockquote type="cite" class="">Hello Christoph,<br class=""><br class="">Setting inodes to null sounds fine to me and as you say since its usage<br class="">is already guarded by ensureOpen, IMO, it should be fine. I've now<br class="">updated the patch to set inodes to null in close() and the new updated<br class="">webrev is at <a href="https://cr.openjdk.java.net/~jpai/webrev/7143743/3/webrev/" class="">https://cr.openjdk.java.net/~jpai/webrev/7143743/3/webrev/</a><br class=""><br class=""></blockquote>This version looks good except it might be better if the comment just says that it clears the inodes map to allow the keys/values be GC’ed.<br class=""></div></div></blockquote><div><br class=""></div>I revised the comment to:</div><div><br class=""></div><div>————————</div><div><br class=""></div><div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$ hg diff</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">diff -r 9338d0f52b2e src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java</b></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(180, 36, 25);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">--- a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java      Mon Jan 13 11:51:45 2020 -0500</b></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">+++ b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/ZipFileSystem.java      Mon Jan 13 15:24:37 2020 -0500</b></span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(200, 20, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">@@ -1,5 +1,5 @@</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> /*</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(180, 36, 25);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">- * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+ * Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  *</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  * This code is free software; you can redistribute it and/or modify it</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(200, 20, 201);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">@@ -490,6 +490,14 @@</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">                 def.end();</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">         }</span></div><p style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; min-height: 13px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+        beginWrite();                // lock and sync</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+        try {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+            // Clear the map so that its keys & values can be garbage collected</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+            inodes = null;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+        } finally {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+            endWrite();</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+        }</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(47, 180, 29);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">+</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">         IOException ioe = null;</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">         synchronized (tmppaths) {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">             for (Path p : tmppaths) {</span></div><div style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$</span></div></div><div>———————————</div><div><br class=""></div><div>I will push the change tomorrow barring any hiccups with Mach5 or additional comments….</div><div><br class=""></div><div>Best</div><div>lance<br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">-Alan<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="930A32BA-BA20-4BCC-BB9E-AFD44F8EBB54" 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=""></body></html>