RFR: 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent
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
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy <darcy@openjdk.org> wrote:
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.
Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5718
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy <darcy@openjdk.org> wrote:
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.
Marked as reviewed by bpb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5718
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy <darcy@openjdk.org> wrote:
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.
Looks okay but will need to go to the jsr166 cvs too (@DougLea). ------------- Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5718
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy <darcy@openjdk.org> wrote:
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.
Just to be sure, does this include only the conditionally serializable annotations in ForkJoinPool and ForkJoinTask in: https://github.com/openjdk/jdk/pull/5718/files/a20d9afbd7b49b452b3c9bdc9f2d5... If so, this looks OK to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/5718
On Tue, 28 Sep 2021 11:28:42 GMT, Doug Lea <dl@openjdk.org> wrote:
Just to be sure, does this include only the conditionally serializable annotations in ForkJoinPool and ForkJoinTask in: https://github.com/openjdk/jdk/pull/5718/files/a20d9afbd7b49b452b3c9bdc9f2d5... If so, this looks OK to me.
Yes, for java.util.concurrent, those are the only two changes needed to compile under the in-progress javac checks. ------------- PR: https://git.openjdk.java.net/jdk/pull/5718
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy <darcy@openjdk.org> wrote:
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.
Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5718
On Mon, 27 Sep 2021 18:40:10 GMT, Joe Darcy <darcy@openjdk.org> wrote:
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.
This pull request has now been integrated. Changeset: 2072bc77 Author: Joe Darcy <darcy@openjdk.org> URL: https://git.openjdk.java.net/jdk/commit/2072bc77b4541c283adaa7eb51a38adcaf71... Stats: 3 lines in 2 files changed: 2 ins; 1 del; 0 mod 8274391: Suppress more warnings on non-serializable non-transient instance fields in java.util.concurrent Reviewed-by: lancea, bpb, alanb, iris ------------- PR: https://git.openjdk.java.net/jdk/pull/5718
participants (6)
-
Alan Bateman
-
Brian Burkhalter
-
Doug Lea
-
Iris Clark
-
Joe Darcy
-
Lance Andersen