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

Jan Lahoda jan.lahoda at oracle.com
Mon Apr 15 11:32:43 UTC 2019


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