The rather-hard-to-decode section 12.6.2 essentially tries to pin down exactly when a reference is guaranteed to remain reachable. It may be worth directly pointing to it. (And perhaps wishing the reader luck :-) )
On Wed, Nov 16, 2016 at 12:21 AM, Zoltán Majó <zoltan.m...@oracle.com> wrote: > Hi David, > > > On 11/16/2016 03:21 AM, David Holmes wrote: > >> Hi Zoltan, >> >> First, I'm okay with latest webrev. >> > > thank you. > > >> Second, I don't want to confuse things but need to correct one thing ... >> > > I think you rather clarified things. > > >> On 15/11/2016 10:41 PM, Zoltán Majó wrote: >> >>> [...] >>> >>> For example, statement (2) can be possibly (mis-)read as the JVM making >>> references unreachable *earlier* than what a programmer may think -- >>> based on the source code.(That is clearly not the case: References are >>> available at least until the latest program point where they are used, >>> otherwise the program would encounter an error.) >>> >> >> Actually it can make references unreachable earlier than may be expected. >> The wording Mandy suggested comes from the JLS itself - see 12.6.1. >> > > That is right -- thank you for pointing to the relevant section of the JLS. > > (Though I agree it isn't the right disclaimer for the current situation - >> where the interpreter keeps the reference reachable longer than naively >> expected). >> > > Please see my reply to Mandy's email. > > > Thank you! > > Best regards, > > > Zoltan > > > >> David >> ----- >> >> It's indeed a JVM "optimization" keep references alive *longer* than it >>> seems to be from the source code. But (1) already encapsulates that >>> without referring to JVM optimizations explicitly. >>> >>> [...] >>>> >>>> >>>> Making it clear “strongly reachable” is a good suggestion. I don’t >>>> see word-smithing is needed in the original sentence; hence my above >>>> suggested change only adds the word “strongly” in this sentence. >>>> >>> >>> I agree. >>> >>> Here is the updated webrev: >>> >>> http://cr.openjdk.java.net/~zmajo/8169000/webrev.02/ >>> >>> Thank you! >>> >>> Best regards, >>> >>> >>> Zoltan >>> >>> >>>> Mandy >>>> >>> >>> >