RFR: JDK-8236266: change error message for the case when a class extends j.l.Record

Tagir Valeev amaembo at gmail.com
Fri Dec 20 00:37:50 UTC 2019


Hello!

What about merging this message with already existing

compiler.err.enum.no.subclassing=\
    classes cannot directly extend java.lang.Enum
?

I mean, enum could reuse the same message passing java.lang.Enum as
{0}. Or this is to big change?

Tagir.


пт, 20 дек. 2019 г., 1:00 Vicente Romero <vicente.romero at oracle.com>:

> Please review this one liner fix to [1] at [2]. This is just a minor
> change in an error message.Currently if a class extends class:
> j.l.Record, javac shows the following error message:
>
> ExtendingRecordClass.java:1: error: records cannot directly extend Record
> class Test extends Record {}
> ^
>
> when Test is not a record but a class. This fix updates the error message,
>
> Thanks,
> Vicente
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8236266
> [2] http://cr.openjdk.java.net/~vromero/8236266/webrev.00/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20191220/6abccb9e/attachment.htm>


More information about the compiler-dev mailing list