RFR: 8274415: Suppress warnings on non-serializable non-transient instance fields in java.xml
Joe Wang
joehw at openjdk.java.net
Tue Sep 28 16:46:27 UTC 2021
On Tue, 28 Sep 2021 07:07:37 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Augmentations to javac's Xlint:serial checking are out for review (#5709) and the java.xml module 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.
>
> I'll run a script to update the copyright years before pushing.
Marked as reviewed by joehw (Reviewer).
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/PSVIAttrNSImpl.java line 63:
> 61:
> 62: /** attribute declaration */
> 63: @SuppressWarnings("serial") // Type of field is not Serializable
For the classes that contain a number of these fields, do we want to put the annotation at the class level?
-------------
PR: https://git.openjdk.java.net/jdk/pull/5730
More information about the core-libs-dev
mailing list