RFR: JDK-8221759: Crash when completing "java.io.File.path"

Robert Field robert.field at oracle.com
Mon May 6 15:20:22 UTC 2019


Thumbs up!

-Robert


On 4/15/19 4:32 AM, Jan Lahoda wrote:
> Hi,
>
> Typing:
> java.io.File.path
> and pressing <tab> leads to a crash/exception. The root reason appears 
> to be that in addition to the expected completions (i.e. 
> 'pathSeparator' and 'pathSeparatorChar'), there is also a private 
> field of File, called "path". That is not accessible, so it is not 
> shown as a completion, but the "SourceCodeAnalysis.documentation" call 
> includes documentation for it, which ultimately leads to the crash.
>
> The proposed fix is to include the accessibility check also in the 
> "SourceCodeAnalysis.documentation" call, so that inaccessible elements 
> are ignored for documentation as they are for completion.
>
> Webrev: http://cr.openjdk.java.net/~jlahoda/8221759/webrev.00/
> JBS: https://bugs.openjdk.java.net/browse/JDK-8221759
>
> How does this look?
>
> Thanks,
>     Jan


More information about the kulla-dev mailing list