RFR: JDK-8310835: Address gaps in -Xlint:serial checks [v4]

Joe Darcy darcy at openjdk.org
Wed Jul 19 19:53:30 UTC 2023


On Tue, 18 Jul 2023 21:58:32 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Refactor Externalizable check.
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 5218:
> 
>> 5216: 
>> 5217:                         if (isExtern && externMethodNames.contains(name)) {
>> 5218:                             log.warning(LintCategory.SERIAL,
> 
> The check for an enum class seems less specific than for record classes, where not only the name but also the flags, return and parameter types are checked.
> But for enum classes this also holds for other methods and fields, so it might be a deliberate choice.

Good catch; addressed in subsequent push.

As follow-up work, I've filed JDK-8312415: "Expand -Xlint:serial checks to enum constants with specialized class bodies."

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14639#discussion_r1268600875


More information about the compiler-dev mailing list