Yes, the fact that this is allowed by javac was what lead me to include this in 
the patch.

Unfortunately the webrev I sent was against JDK 15 instead of 14. I uploaded a 
new webrev for 14. Merging was straightforward and no changes were required for 
the code. Only test output had to be adapted to the old HTML anchor style.

http://cr.openjdk.java.net/~hannesw/8224052/webrev.01/

This also adds the copyright header that was missing in the new test file as 
noted by Sundar.

Hannes


> Am 16.01.2020 um 02:14 schrieb Jonathan Gibbons <[email protected]>:
> 
> 
> 
> On 01/15/2020 03:47 PM, Jonathan Gibbons wrote:
>> 
>> As regards package-private and private intermediate supertypes, in the 
>> absence of any pre-existing comment to the contrary, your inclusion of 
>> isPrivate in isUndocumentedEnclosure is morally justifiable, even if it is a 
>> change in behavior in an absurdly weird corner case that (to the best of my 
>> knowledge) is undocumented.
> 
> As further justification for this change in behavior to be regarded as a bug 
> fix, I note that javac allows access to public methods of private 
> intermediate supertypes.  This implies the behavior is required by JLS, and 
> so is justification for javadoc documenting the available methods.
> 
> Toy files attached, for the record.
> 
> -- Jon
> <Client.java><Demo.java>

Reply via email to