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

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Dec 20 00:41:35 UTC 2019


I noticed that too - I assumed we wanted to minimize disruption for now 
- I'll leave the decision to Vicente

Maurizio

On 20/12/2019 00:37, Tagir Valeev wrote:
> 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 
> <mailto: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/d98c2423/attachment-0001.htm>


More information about the compiler-dev mailing list