RFR: 8202056: Expand serial warning to check for bad overloads of serial-related methods and ineffectual fields [v16]

Joe Darcy darcy at openjdk.java.net
Tue Oct 12 00:15:08 UTC 2021


On Thu, 7 Oct 2021 16:07:41 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> Joe Darcy has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 60 commits:
>> 
>>  - Adding warning for serial fields in interfaces; cleanup.
>>  - Merge branch 'master' into JDK-8202056
>>  - Add thrown type checks.
>>  - Improve no-args checking.
>>  - Merge branch 'master' into JDK-8202056
>>  - Favor names in properties; clean up whitespace usage in tests.
>>  - Improve argument checking.
>>  - Improve checking of method modifiers.
>>  - Fix whitespace.
>>  - Merge branch 'master' into JDK-8202056
>>  - ... and 50 more: https://git.openjdk.java.net/jdk/compare/c833b4d1...9ef6aeb7
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java line 5564:
> 
>> 5562:      * Check structure of serialization declarations.
>> 5563:      */
>> 5564:     private void checkSerialStructure(JCClassDecl tree, ClassSymbol c, Env<AttrContext> env) {
> 
> I think that most of the new code, checking related code, should live in com.sun.tools.javac.Check rather than here in Attr

Pushed an update from Jan which moved most the new logic to Check along with some additional refactoring to fully replace use of javax.lang.model modifiers with javac flags. Thanks to Jan for the refactoring!

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

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


More information about the compiler-dev mailing list