Suppress warning around pathArgument 17/100417/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:06:09 +0000 (17:06 +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>
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/InstanceIdentifier.java

index bea92bf979b99108df8ad16ff61dfaa5ea859295..216ec21fc48c600f8e4db5652bf1d74f2a79b000 100644 (file)
@@ -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<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;