Suppress warning around pathArgument 21/100421/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Apr 2022 15:05:15 +0000 (17:05 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 5 Apr 2022 15:48:53 +0000 (17:48 +0200)
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 <robert.varga@pantheon.tech>
(cherry picked from commit 7ffe4caeeaa4408aebd96b124639089fa25db594)

binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java

index 2b5a5e4cf0cb0a37a63806112fee4283d3831f18..4aa4de8a2664509157fb725200eadc684c9b2149 100644 (file)
@@ -17,6 +17,7 @@ import com.google.common.base.VerifyException;
 import com.google.common.collect.ImmutableCollection;
 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<T extends DataObject>
      * 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<PathArgument> pathArguments;
 
     private final @NonNull Class<T> targetType;