Bump upstreams 79/109479/5
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Dec 2023 09:56:46 +0000 (10:56 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 31 Dec 2023 19:56:30 +0000 (19:56 +0000)
Adopt:
- odparent-13.0.10
- infrautils-6.0.5
- yangtools-11.0.5
- mdsal-12.0.4
- controller-8.0.4
- aaa-0.18.4

Change-Id: I8c5b540fd07ce872b97bd4d37d9cf493a30c1777
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
43 files changed:
apps/netconf-topology-singleton/src/main/java/org/opendaylight/netconf/topology/singleton/impl/actors/NetconfNodeActor.java
apps/pom.xml
artifacts/pom.xml
features/features-netconf-experimental/pom.xml
features/features-netconf-testing/pom.xml
features/features-netconf/pom.xml
features/parent/pom.xml
features/pom.xml
karaf-static/pom.xml
karaf/pom.xml
keystore/pom.xml
model/pom.xml
netconf/pom.xml
netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/AbstractExecutionStrategy.java
netconf/tools/netconf-testtool/src/main/java/org/opendaylight/netconf/test/tool/client/stress/Parameters.java
netconf/tools/pom.xml
parent/pom.xml
plugins/netconf-client-mdsal/src/main/java/org/opendaylight/netconf/client/mdsal/NetconfDeviceCommunicator.java
plugins/pom.xml
pom.xml
protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/mapping/operations/DefaultCloseSession.java
protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/mapping/operations/DefaultStartExi.java
protocol/netconf-server/src/main/java/org/opendaylight/netconf/server/mapping/operations/DefaultStopExi.java
protocol/pom.xml
restconf/pom.xml
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/databind/AbstractBody.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/databind/JsonResourceBody.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/api/DatabindContext.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/mdsal/MdsalRestconfServer.java
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/server/spi/RestconfStream.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/databind/JsonResourceBodyTest.java
restconf/restconf-nb/src/test/java/org/opendaylight/restconf/nb/rfc8040/databind/XmlResourceBodyTest.java
restconf/sal-rest-connector-config/pom.xml
restconf/websocket-client/pom.xml
restconf/websocket-client/src/main/java/org/opendaylight/restconf/websocket/client/WebSocketSessionHandler.java
third-party/pom.xml
third-party/shaded-exificient-jar/pom.xml
third-party/shaded-exificient/pom.xml
third-party/shaded-sshd-jar/pom.xml
third-party/shaded-sshd/pom.xml
transport/pom.xml
transport/transport-ssh/src/main/java/org/opendaylight/netconf/transport/ssh/TransportServerSession.java
truststore/pom.xml

index f8a656e00756b607428802b4b4ebb503c9f30b45..679c63bfbc9236dda13a66926ee12178af42b90b 100644 (file)
@@ -88,9 +88,9 @@ public class NetconfNodeActor extends AbstractUntypedActor {
     private Timeout actorResponseWaitTime;
     private RemoteDeviceId id;
     private NetconfTopologySetup setup;
-    private List<SourceIdentifier> sourceIdentifiers;
-    private DOMRpcService deviceRpc;
-    private DOMActionService deviceAction;
+    private List<SourceIdentifier> sourceIdentifiers = null;
+    private DOMRpcService deviceRpc = null;
+    private DOMActionService deviceAction = null;
     private SlaveSalFacade slaveSalManager;
     private DOMDataBroker deviceDataBroker;
     private NetconfDataTreeService netconfService;
index ea39c8b136108e445fc84f5db2754ce1428fd0ee..aaf3b265bf12d6c84ad7aab9eab358c4c2fd4496 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index fa69e394a572e653221b8ac70643cb4432424549..e36f3940e57914e3c0744a7f70f7fa582434bd2f 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>odlparent-lite</artifactId>
-      <version>13.0.7</version>
+      <version>13.0.10</version>
       <relativePath/>
     </parent>
 
index d249d0f3753a9499cdf129cc8edf60565fc312ad..d580ac759fe836600970fcfeb10f4b2dfae1029a 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 9a5ac173e88635d419fdaea0332a80f284c8b56d..a0bb69ff6028af4035143c122c110cf1a7c817e5 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
       <groupId>org.opendaylight.odlparent</groupId>
       <artifactId>feature-repo-parent</artifactId>
-      <version>13.0.7</version>
+      <version>13.0.10</version>
       <relativePath/>
   </parent>
 
index 18652a7bc52e1a4fc1439fa01de409dfd304b57d..dcde600c4482c1e2e3281a19cc57861bc53cea59 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index bb03936274692ba69459e254b8001c08b99b45d9..fa7ac1be166b5a181e603aa1ea9158ac3c16c525 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 8d04b316a7c67422839423ae0f75d56867ea297c..87804122800fc57def6f7723f645e42a191f3e7b 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index f67c8a4e57afe127a6d076167cab81c763d50c20..f9c25dd5c59cbad02803adf103290df227f1eab5 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>karaf-dist-static</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 24527eac9574a071b1057a55dc4c554b8c4d5e07..d7c6c8a71b27d0645a5584f0c90351c7c6d7afa8 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.netconf</groupId>
       <dependency>
         <groupId>org.opendaylight.infrautils</groupId>
         <artifactId>infrautils-artifacts</artifactId>
-        <version>6.0.4</version>
+        <version>6.0.5</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>controller-artifacts</artifactId>
-        <version>8.0.3</version>
+        <version>8.0.4</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index cc68dfa53b3da054f6d4a952ce300e28e9ceca12..71212f7bb16b233e2855ec9b7fe824c66b5177b1 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index e8e5ce0b24f3fe3a5f942faf27f97080f5390614..cdcce0af6e81aca6a4cc5b2e27db6829ae083a44 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 79f86aa86f4fa8e6aa869126e96741191f9bae5d..7dd3f5b2be582512ad4e5fc60ffc388b2db4bf32 100644 (file)
@@ -13,7 +13,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
 
index 35d771f2f21a0201a293acea035786572be85d80..7b6a778d142d44dd376e9eca559fb081a60784cb 100644 (file)
@@ -23,29 +23,29 @@ abstract class AbstractExecutionStrategy implements ExecutionStrategy {
                               final NetconfDeviceCommunicator sessionListener) {
         editAmount = editConfigMsgs.size();
         this.params = params;
-        this.preparedMessages = editConfigMsgs;
+        preparedMessages = editConfigMsgs;
         this.sessionListener = sessionListener;
-        this.editBatches = countEditBatchSizes(params, editConfigMsgs.size());
+        editBatches = countEditBatchSizes(params.editBatchSize, editAmount);
     }
 
-    private static List<Integer> countEditBatchSizes(final Parameters params, final int amount) {
-        final List<Integer> editBatches = new ArrayList<>();
-        if (params.editBatchSize != amount) {
-            final int fullBatches = amount / params.editBatchSize;
+    private static List<Integer> countEditBatchSizes(final int editBatchSize, final int amount) {
+        final var editBatches = new ArrayList<Integer>();
+        if (editBatchSize != amount) {
+            final int fullBatches = amount / editBatchSize;
             for (int i = 0; i < fullBatches; i++) {
-                editBatches.add(params.editBatchSize);
+                editBatches.add(editBatchSize);
             }
 
-            if (amount % params.editBatchSize != 0) {
-                editBatches.add(amount % params.editBatchSize);
+            final var remainder = amount % editBatchSize;
+            if (remainder != 0) {
+                editBatches.add(remainder);
             }
         } else {
-            editBatches.add(params.editBatchSize);
+            editBatches.add(editBatchSize);
         }
         return editBatches;
     }
 
-
     protected Parameters getParams() {
         return params;
     }
index d807da5412b3a67a72dbec3401dd20c53ea06835..45a049da2556e736b9c16872e8001ffc0899e002 100644 (file)
@@ -5,10 +5,10 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.netconf.test.tool.client.stress;
 
 import com.google.common.base.Preconditions;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.File;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
@@ -32,6 +32,7 @@ public class Parameters {
     public File editContent;
 
     @Arg(dest = "edit-batch-size")
+    @SuppressFBWarnings("PA_PUBLIC_PRIMITIVE_ATTRIBUTE")
     public int editBatchSize;
 
     @Arg(dest = "candidate-datastore")
index 67c9ca72d1c8d4dc3dd5ee77850c4c3713e5aec2..123e8cdb3de68f533a0dd3607b614ed7afa7cede 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
 
index 89f5b2ca87c26006dd7ecd3317671d6998716408..c6ef1dfc1b4ddf3eb4c744bd827fd1175ea13eda 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>12.0.3</version>
+    <version>12.0.4</version>
     <relativePath/>
   </parent>
 
       <dependency>
         <groupId>org.opendaylight.infrautils</groupId>
         <artifactId>infrautils-artifacts</artifactId>
-        <version>6.0.4</version>
+        <version>6.0.5</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
       <dependency>
         <groupId>org.opendaylight.aaa</groupId>
         <artifactId>aaa-artifacts</artifactId>
-        <version>0.18.3</version>
+        <version>0.18.4</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
       <dependency>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>8.0.3</version>
+        <version>8.0.4</version>
         <type>pom</type>
         <scope>import</scope>
       </dependency>
index 3c90e6d78858cebe8092a661521164cc523caed5..a356f0f7a63d9a7374858a774627d9b7153bceff 100644 (file)
@@ -13,6 +13,7 @@ import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.EOFException;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.VarHandle;
@@ -87,6 +88,7 @@ public class NetconfDeviceCommunicator implements NetconfClientSessionListener,
     //
     // This field is manipulated using CLOSING VarHandle
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "UUF_UNUSED_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile boolean closing;
 
     public boolean isSessionClosing() {
index 25e84d623769822f853285f785e768a0d04aacc7..4196dddad6ed1ec53f7aec806540680bdd07d6c8 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
diff --git a/pom.xml b/pom.xml
index f36d8d4096c1fa1b6303aa3754181c0ee3a38e58..34bfa715cae4fa77a8c6cd99e307ab38a02914b0 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 421122f32d26237daa9ebbd378da1c75497ade1d..70c2aaf6381d2a0a1f20e06eb916c528f006d83e 100644 (file)
@@ -30,7 +30,7 @@ public class DefaultCloseSession extends AbstractSingletonNetconfOperation imple
     public static final String CLOSE_SESSION = "close-session";
 
     private final AutoCloseable sessionResources;
-    private NetconfServerSession session;
+    private NetconfServerSession session = null;
 
     public DefaultCloseSession(final SessionIdType sessionId, final AutoCloseable sessionResources) {
         super(sessionId);
index 1873ae3aa0f18ee046d8253db297ae4691dae794..64a9c6b57ae4470e7248f48835779cda4a95bdab 100644 (file)
@@ -29,7 +29,8 @@ public class DefaultStartExi extends AbstractSingletonNetconfOperation implement
     public static final String START_EXI = "start-exi";
 
     private static final Logger LOG = LoggerFactory.getLogger(DefaultStartExi.class);
-    private NetconfServerSession netconfSession;
+
+    private NetconfServerSession netconfSession = null;
 
     public DefaultStartExi(final SessionIdType sessionId) {
         super(sessionId);
index ed23a75204608ed8db360ed9cd1d84c382b456b0..75ef23f59f77278c3cb107cd0b7005c8ed1a228e 100644 (file)
@@ -23,7 +23,8 @@ public class DefaultStopExi extends AbstractSingletonNetconfOperation implements
     private static final Logger LOG = LoggerFactory.getLogger(DefaultStopExi.class);
 
     public static final String STOP_EXI = "stop-exi";
-    private NetconfServerSession netconfSession;
+
+    private NetconfServerSession netconfSession = null;
 
     public DefaultStopExi(final SessionIdType sessionId) {
         super(sessionId);
index b59abba9ec6f8d3f1ca91ec954638016a0c59fd0..48eb815a3e677c728d68f07106d924129f79e377 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index d3c023d07f7cf597434fda7923f805255e5dd5ed..2a27f8e8ee91d2b364c8a55847280e2c0b926b3c 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 2301c2b2f4f543e1f21ec0c4c4e251dec1da3dcf..8731c1c7748adb827146394a9ffb11817d5664e8 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.restconf.nb.rfc8040.databind;
 
 import static java.util.Objects.requireNonNull;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.invoke.MethodHandles;
@@ -40,6 +41,7 @@ public abstract sealed class AbstractBody implements AutoCloseable
     }
 
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile InputStream inputStream;
 
     AbstractBody(final InputStream inputStream) {
index 7146ea582751c5bcef7a5b096c79857b21c5d23b..de30d31ac92e132dffa91d611132eac409893ad9 100644 (file)
@@ -7,20 +7,30 @@
  */
 package org.opendaylight.restconf.nb.rfc8040.databind;
 
+import com.google.gson.JsonIOException;
+import com.google.gson.JsonParseException;
 import com.google.gson.stream.JsonReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.nio.charset.StandardCharsets;
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
 import org.opendaylight.restconf.server.api.DataPutPath;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
+import org.opendaylight.yangtools.yang.common.ErrorType;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
 import org.opendaylight.yangtools.yang.data.codec.gson.JsonParserStream;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A JSON-encoded {@link ResourceBody}.
  */
 public final class JsonResourceBody extends ResourceBody {
+    private static final Logger LOG = LoggerFactory.getLogger(JsonResourceBody.class);
+
     public JsonResourceBody(final InputStream inputStream) {
         super(inputStream);
     }
@@ -31,10 +41,20 @@ public final class JsonResourceBody extends ResourceBody {
         try (var jsonParser = newParser(path, writer)) {
             try (var reader = new JsonReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
                 jsonParser.parse(reader);
+            } catch (JsonParseException e) {
+                LOG.debug("Error parsing JSON input", e);
+                throw newRDE(e);
             }
         }
     }
 
+    private static @NonNull RestconfDocumentedException newRDE(final JsonParseException cause) {
+        final var root = cause instanceof JsonIOException jsonIO && jsonIO.getCause() instanceof IOException io ? io
+            : cause;
+        return new RestconfDocumentedException("Error parsing input: " + root.getMessage(), ErrorType.PROTOCOL,
+            ErrorTag.MALFORMED_MESSAGE, cause);
+    }
+
     private static JsonParserStream newParser(final DataPutPath path, final NormalizedNodeStreamWriter writer) {
         final var codecs = path.databind().jsonCodecs();
         final var inference = path.inference();
index 1959d53bb8c41ff351af269826f3867f49e024d4..befe466df6cdaeb467dc7cac0ec2cfa3db8a9495 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.restconf.server.api;
 
 import static java.util.Objects.requireNonNull;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.VarHandle;
 import org.eclipse.jdt.annotation.NonNull;
@@ -41,10 +42,13 @@ public final class DatabindContext {
     private final @NonNull MountPointContext mountContext;
 
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "UUF_UNUSED_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile DataSchemaContextTree schemaTree;
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "UUF_UNUSED_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile JSONCodecFactory jsonCodecs;
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "UUF_UNUSED_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile XmlCodecFactory xmlCodecs;
 
     private DatabindContext(final @NonNull MountPointContext mountContext) {
index 4a14e6b1362d87f09b510d04b1db522c4b86f2a5..edfe86e53d8e01d5b2c45b7b975250d91511afab 100644 (file)
@@ -12,6 +12,7 @@ import static java.util.Objects.requireNonNull;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.VarHandle;
 import java.net.URI;
@@ -110,6 +111,7 @@ public final class MdsalRestconfServer
     private final Registration reg;
 
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile MdsalRestconfStrategy localStrategy;
 
     @Inject
index 18495a58c5f357283f2bd74820bb2ac3ab1c28a1..a746a98a1b5ae03e8a38ddbf59d8a61fcc57ebb1 100644 (file)
@@ -12,6 +12,7 @@ import static java.util.Objects.requireNonNull;
 import com.google.common.base.MoreObjects;
 import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.collect.ImmutableMap;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.io.UnsupportedEncodingException;
 import java.lang.invoke.MethodHandles;
 import java.lang.invoke.VarHandle;
@@ -192,6 +193,7 @@ public final class RestconfStream<T> {
 
     // Accessed via SUBSCRIBERS, 'null' indicates we have been shut down
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile Subscribers<T> subscribers = Subscribers.empty();
 
     @GuardedBy("this")
index f1c3dcb122854e627b42b6720606df694e7a8cc4..5efba38bb415039425e03937eda151df3a9f47be 100644 (file)
@@ -8,8 +8,6 @@
 package org.opendaylight.restconf.nb.rfc8040.databind;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.util.Map;
 import org.junit.jupiter.api.Test;
@@ -109,14 +107,17 @@ class JsonResourceBodyTest extends AbstractResourceBodyTest {
 
     @Test
     void testMissingKeys() {
-        final var ex = assertThrows(IllegalArgumentException.class,
-            () -> parse("nested-module:depth1-cont/depth2-list2=one,two", """
+        final var error = assertError(() -> parse("nested-module:depth1-cont/depth2-list2=one,two", """
                 {
                   "depth2-list2" : {
                     "depth3-lf1-key" : "one"
                   }
                 }"""));
-        assertNull(ex.getMessage());
+        assertEquals("""
+            Error parsing input: List entry (urn:nested:module?revision=2014-06-03)depth2-list2 is missing leaf values \
+            for [depth3-lf2-key]""", error.getErrorMessage());
+        assertEquals(ErrorType.PROTOCOL, error.getErrorType());
+        assertEquals(ErrorTag.MALFORMED_MESSAGE, error.getErrorTag());
     }
 
     @Test
index 50db4a3db3abdd0b0dae296b9c536867512f6f07..90645614cf93ac130017086d415878239897282f 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.restconf.nb.rfc8040.databind;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.Mockito.doReturn;
@@ -208,11 +207,14 @@ class XmlResourceBodyTest extends AbstractResourceBodyTest {
 
     @Test
     void testMissingKeys() throws Exception {
-        final var ex = assertThrows(IllegalArgumentException.class,
-            () -> parse("nested-module:depth1-cont/depth2-list2=one,two", """
+        final var error = assertError(() -> parse("nested-module:depth1-cont/depth2-list2=one,two", """
                 <depth2-list2 xmlns="urn:nested:module">
                   <depth3-lf1-key>one</depth3-lf1-key>
                 </depth2-list2>"""));
-        assertNull(ex.getMessage());
+        assertEquals("""
+            Error parsing input: List entry (urn:nested:module?revision=2014-06-03)depth2-list2 is missing leaf values \
+            for [depth3-lf2-key]""", error.getErrorMessage());
+        assertEquals(ErrorType.PROTOCOL, error.getErrorType());
+        assertEquals(ErrorTag.MALFORMED_MESSAGE, error.getErrorTag());
     }
 }
index 9f9a34eeb051cb6978cbadd5447447e33d1e4062..c5d5f43a608c8ce721862454ad0c3cd8b394da2f 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>13.0.7</version>
+    <version>13.0.10</version>
     <relativePath/>
   </parent>
 
index 05efd985a9c69309086fd79ca70b76363bda9794..e2f6611962256e2a1ce08822e8fba8720a0a8b37 100644 (file)
@@ -29,7 +29,6 @@
         <dependency>
             <groupId>net.sourceforge.argparse4j</groupId>
             <artifactId>argparse4j</artifactId>
-            <version>0.9.0</version>
         </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
index 6c5e2536a4ef404c7cb212ac9c35d0a48134b711..520a522c1adf342a28219bc85de2922188384747 100644 (file)
@@ -30,11 +30,10 @@ import org.slf4j.LoggerFactory;
  */
 @WebSocket
 public class WebSocketSessionHandler {
-
     private static final Logger LOG = LoggerFactory.getLogger(WebSocketSessionHandler.class);
 
     private final CountDownLatch sessionCloseLatch = new CountDownLatch(1);
-    Session webSocketSession;
+    Session webSocketSession = null;
 
     /**
      * Handling of the initialized web-socket session. Created web-socket session is saved.
index 2150d7a04fd8611ee2cacf72db10db49efb02d51..9770001bce3242c5a49bc8b57b801607fda989ad 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 0e53cddf0853164d8123cce2166f1757109875d2..085980904807d123d372677b184dfb4e91d91bf8 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 7035e8e1d69f3bc1ca106f27537cb6209c49c18f..3587c2826149949096a83e63ec8e2a61d8013c13 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index acdd8d080f9077be380df01430541cd165caca0c..261979e101a66117777ac97611f719f1359ec57a 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 54a97c72589e8b9975892ca69eb0c689f2688fb3..58c591d4ec7f000bc7e2f14da54ac01d61a4aed8 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>bundle-parent</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 53408fb7b6d945d0784187774e5573835e023601..e157af85db90e3b8ad99bb36c889fa6045b1aa98 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>
 
index 1ea4287e493b8b60e46a7dbcf4372d15762bdfdc..90b358d15200006dcf44798afb114fe55dbafc15 100644 (file)
@@ -11,6 +11,7 @@ import static java.util.Objects.requireNonNull;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import com.google.common.util.concurrent.SettableFuture;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import io.netty.channel.ChannelHandlerContext;
 import java.io.IOException;
 import java.lang.invoke.MethodHandles;
@@ -43,6 +44,7 @@ final class TransportServerSession extends ServerSessionImpl {
     }
 
     @SuppressWarnings("unused")
+    @SuppressFBWarnings(value = "UUF_UNUSED_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
     private volatile State state;
 
     TransportServerSession(final TransportSshServer server, final IoSession ioSession) throws Exception {
index 7e24118a8cc97f03bcdcc5b9bf5014e8ec8be8e6..251f7c8db00d1d9cd19de423094ccfa22d844561 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>13.0.7</version>
+        <version>13.0.10</version>
         <relativePath/>
     </parent>