From 7ffe4caeeaa4408aebd96b124639089fa25db594 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Tue, 5 Apr 2022 17:05:15 +0200 Subject: [PATCH] Suppress warning around pathArgument For some strange reason SE_BAD_FIELD is triggered with JDK17. The warning is a false positive, as we are handling serialization via Externalizable proxy. Change-Id: I4035194852f6b0a914d76929124d92ca8d3039fe Signed-off-by: Robert Varga --- .../opendaylight/yangtools/yang/binding/InstanceIdentifier.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java b/binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java index bea92bf979..216ec21fc4 100644 --- a/binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java +++ b/binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java @@ -17,6 +17,7 @@ import com.google.common.base.MoreObjects.ToStringHelper; import com.google.common.base.VerifyException; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.ObjectStreamException; import java.io.Serializable; import java.util.Collections; @@ -68,6 +69,7 @@ public class InstanceIdentifier * Protected to differentiate internal and external access. Internal access is required never to modify * the contents. References passed to outside entities have to be wrapped in an unmodifiable view. */ + @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "Handled through Externalizable proxy") final Iterable pathArguments; private final @NonNull Class targetType; -- 2.36.6