RFR: 8205187: javac/javadoc should not crash if no java.lang; crash message obsolete

Jonathan Gibbons jjg at openjdk.java.net
Wed Dec 22 16:20:22 UTC 2021


On Wed, 22 Dec 2021 16:08:47 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> Please review this PR which is basically changing the error message the compiler shows if the package java.lang can't be found, the current message is obsolete,
>> 
>> TIA
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java line 362:
> 
>> 360:                     log.error(Errors.NoJavaLang);
>> 361:                     throw new Abort();
>> 362:                 }
> 
> `Abort` seems to have different semantics to `FatalError`.
> Unless there is a good reason for the change, it might be more advisable to stay with `FatalError` and just change the text of the message.

"no java.lang" seems similar to a completion error, which is normally handled with `Abort`, so that might be a good reason for the change.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6898


More information about the compiler-dev mailing list