RFR: 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent

Joe Darcy darcy at openjdk.java.net
Mon Sep 27 18:55:18 UTC 2021


Follow-up change to JDK-8232230, augmentations to javac's Xlint:serial checking are out for review (https://github.com/openjdk/jdk/pull/5709) and java.util.concurrent would need some changes to pass under the expanded checks.

The changes are to suppress warnings where non-transient fields in serializable types are not declared with a type statically known to be serializable. That isn't necessarily a correctness issues, but it does merit further scrutiny.

In ForkJoinTask, the SuppressWarnings annotation previously applied in JDK-8232230, seems to have been misplaced to a different field; this change corrects it.

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

Commit messages:
 - 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent

Changes: https://git.openjdk.java.net/jdk/pull/5718/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5718&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8274391
  Stats: 3 lines in 2 files changed: 2 ins; 1 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5718.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5718/head:pull/5718

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


More information about the core-libs-dev mailing list