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:
private Timeout actorResponseWaitTime;
private RemoteDeviceId id;
private NetconfTopologySetup setup;
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;
private SlaveSalFacade slaveSalManager;
private DOMDataBroker deviceDataBroker;
private NetconfDataTreeService netconfService;
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>feature-repo-parent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf-dist-static</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf-dist-static</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>karaf4-parent</artifactId>
<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>
<relativePath/>
</parent>
<groupId>org.opendaylight.netconf</groupId>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>infrautils-artifacts</artifactId>
<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>
<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>
<type>pom</type>
<scope>import</scope>
</dependency>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
final NetconfDeviceCommunicator sessionListener) {
editAmount = editConfigMsgs.size();
this.params = params;
final NetconfDeviceCommunicator sessionListener) {
editAmount = editConfigMsgs.size();
this.params = params;
- this.preparedMessages = editConfigMsgs;
+ preparedMessages = editConfigMsgs;
this.sessionListener = sessionListener;
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++) {
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);
- editBatches.add(params.editBatchSize);
+ editBatches.add(editBatchSize);
protected Parameters getParams() {
return params;
}
protected Parameters getParams() {
return params;
}
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
* 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;
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;
import java.io.File;
import java.net.InetAddress;
import java.net.InetSocketAddress;
public File editContent;
@Arg(dest = "edit-batch-size")
public File editContent;
@Arg(dest = "edit-batch-size")
+ @SuppressFBWarnings("PA_PUBLIC_PRIMITIVE_ATTRIBUTE")
public int editBatchSize;
@Arg(dest = "candidate-datastore")
public int editBatchSize;
@Arg(dest = "candidate-datastore")
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
<parent>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>binding-parent</artifactId>
- <version>12.0.3</version>
+ <version>12.0.4</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<dependency>
<groupId>org.opendaylight.infrautils</groupId>
<artifactId>infrautils-artifacts</artifactId>
<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>
<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>
<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>
<type>pom</type>
<scope>import</scope>
</dependency>
import com.google.common.collect.ImmutableMap;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
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;
import java.io.EOFException;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
//
// This field is manipulated using CLOSING VarHandle
@SuppressWarnings("unused")
//
// 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() {
private volatile boolean closing;
public boolean isSessionClosing() {
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
public static final String CLOSE_SESSION = "close-session";
private final AutoCloseable sessionResources;
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);
public DefaultCloseSession(final SessionIdType sessionId, final AutoCloseable sessionResources) {
super(sessionId);
public static final String START_EXI = "start-exi";
private static final Logger LOG = LoggerFactory.getLogger(DefaultStartExi.class);
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);
public DefaultStartExi(final SessionIdType sessionId) {
super(sessionId);
private static final Logger LOG = LoggerFactory.getLogger(DefaultStopExi.class);
public static final String STOP_EXI = "stop-exi";
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);
public DefaultStopExi(final SessionIdType sessionId) {
super(sessionId);
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
import static java.util.Objects.requireNonNull;
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;
import java.io.IOException;
import java.io.InputStream;
import java.lang.invoke.MethodHandles;
}
@SuppressWarnings("unused")
}
@SuppressWarnings("unused")
+ @SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
private volatile InputStream inputStream;
AbstractBody(final InputStream inputStream) {
private volatile InputStream inputStream;
AbstractBody(final InputStream inputStream) {
*/
package org.opendaylight.restconf.nb.rfc8040.databind;
*/
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 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.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.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 {
/**
* 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);
}
public JsonResourceBody(final InputStream inputStream) {
super(inputStream);
}
try (var jsonParser = newParser(path, writer)) {
try (var reader = new JsonReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) {
jsonParser.parse(reader);
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();
private static JsonParserStream newParser(final DataPutPath path, final NormalizedNodeStreamWriter writer) {
final var codecs = path.databind().jsonCodecs();
final var inference = path.inference();
import static java.util.Objects.requireNonNull;
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;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import org.eclipse.jdt.annotation.NonNull;
private final @NonNull MountPointContext mountContext;
@SuppressWarnings("unused")
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")
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")
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) {
private volatile XmlCodecFactory xmlCodecs;
private DatabindContext(final @NonNull MountPointContext mountContext) {
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
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;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
import java.net.URI;
private final Registration reg;
@SuppressWarnings("unused")
private final Registration reg;
@SuppressWarnings("unused")
+ @SuppressFBWarnings(value = "URF_UNREAD_FIELD", justification = "https://github.com/spotbugs/spotbugs/issues/2749")
private volatile MdsalRestconfStrategy localStrategy;
@Inject
private volatile MdsalRestconfStrategy localStrategy;
@Inject
import com.google.common.base.MoreObjects;
import com.google.common.base.MoreObjects.ToStringHelper;
import com.google.common.collect.ImmutableMap;
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;
import java.io.UnsupportedEncodingException;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.VarHandle;
// Accessed via SUBSCRIBERS, 'null' indicates we have been shut down
@SuppressWarnings("unused")
// 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")
private volatile Subscribers<T> subscribers = Subscribers.empty();
@GuardedBy("this")
package org.opendaylight.restconf.nb.rfc8040.databind;
import static org.junit.jupiter.api.Assertions.assertEquals;
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;
import java.util.Map;
import org.junit.jupiter.api.Test;
@Test
void testMissingKeys() {
@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"
}
}"""));
{
"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());
package org.opendaylight.restconf.nb.rfc8040.databind;
import static org.junit.jupiter.api.Assertions.assertEquals;
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;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doReturn;
@Test
void testMissingKeys() throws Exception {
@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>"""));
<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());
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<dependency>
<groupId>net.sourceforge.argparse4j</groupId>
<artifactId>argparse4j</artifactId>
<dependency>
<groupId>net.sourceforge.argparse4j</groupId>
<artifactId>argparse4j</artifactId>
- <version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
</dependency>
<dependency>
<groupId>org.opendaylight.controller</groupId>
*/
@WebSocket
public class WebSocketSessionHandler {
*/
@WebSocket
public class WebSocketSessionHandler {
private static final Logger LOG = LoggerFactory.getLogger(WebSocketSessionHandler.class);
private final CountDownLatch sessionCloseLatch = new CountDownLatch(1);
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.
/**
* Handling of the initialized web-socket session. Created web-socket session is saved.
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundle-parent</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
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;
import io.netty.channel.ChannelHandlerContext;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
}
@SuppressWarnings("unused")
}
@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 {
private volatile State state;
TransportServerSession(final TransportSshServer server, final IoSession ioSession) throws Exception {
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
<parent>
<groupId>org.opendaylight.odlparent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>13.0.7</version>
+ <version>13.0.10</version>
<relativePath/>
</parent>
<relativePath/>
</parent>