From 0d5aac55f83f745656f047a8af1a4b63568882ce Mon Sep 17 00:00:00 2001 From: Stephen Kitt Date: Fri, 15 Dec 2017 15:09:52 +0100 Subject: [PATCH] Adjust for odlparent 3 / yangtools 2 Change-Id: Ibdba54c92c44c63bef11df9f5fa9beca88c6ca3d Signed-off-by: Stephen Kitt --- commons/it/pom.xml | 2 +- commons/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml | 2 +- .../hwvtepsouthbound-features/features/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-api/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-rest/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-test/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound-ui/pom.xml | 2 +- .../odl-ovsdb-hwvtepsouthbound/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-features/pom.xml | 2 +- .../ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java | 6 +++--- .../reconciliation/ReconciliationManager.java | 4 +++- hwvtepsouthbound/hwvtepsouthbound-it/pom.xml | 2 +- hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml | 2 +- hwvtepsouthbound/pom.xml | 2 +- library/artifacts/pom.xml | 2 +- library/features/features/pom.xml | 2 +- library/features/odl-ovsdb-library/pom.xml | 2 +- library/features/pom.xml | 2 +- library/impl/pom.xml | 2 +- .../opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java | 3 ++- .../ovsdb/lib/notation/json/OvsdbTypesIdResolver.java | 8 ++++---- library/it/pom.xml | 2 +- library/karaf/pom.xml | 2 +- library/pom.xml | 2 +- pom.xml | 2 +- schemas/hardwarevtep/pom.xml | 2 +- schemas/openvswitch/pom.xml | 2 +- schemas/pom.xml | 2 +- southbound/pom.xml | 2 +- southbound/southbound-artifacts/pom.xml | 2 +- southbound/southbound-features/features/pom.xml | 2 +- .../southbound-features/odl-ovsdb-southbound-api/pom.xml | 2 +- .../odl-ovsdb-southbound-impl-rest/pom.xml | 2 +- .../odl-ovsdb-southbound-impl-ui/pom.xml | 2 +- .../southbound-features/odl-ovsdb-southbound-impl/pom.xml | 2 +- .../southbound-features/odl-ovsdb-southbound-test/pom.xml | 2 +- southbound/southbound-features/pom.xml | 2 +- southbound/southbound-impl/pom.xml | 2 +- .../ovsdb/southbound/InstanceIdentifierCodec.java | 6 +++--- .../southbound/reconciliation/ReconciliationManager.java | 2 +- .../ovsdb/southbound/InstanceIdentifierCodecTest.java | 8 ++++---- southbound/southbound-it/pom.xml | 2 +- southbound/southbound-karaf/pom.xml | 2 +- utils/pom.xml | 2 +- utils/yang-utils/pom.xml | 2 +- 46 files changed, 59 insertions(+), 56 deletions(-) diff --git a/commons/it/pom.xml b/commons/it/pom.xml index 110f9c5fb..e4975f27d 100644 --- a/commons/it/pom.xml +++ b/commons/it/pom.xml @@ -64,7 +64,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - org.codehaus.sonar-plugins.java + org.sonarsource.java sonar-jacoco-listeners ${sonar-jacoco-listeners.version} test diff --git a/commons/pom.xml b/commons/pom.xml index 9f5648850..9e0aa97ce 100644 --- a/commons/pom.xml +++ b/commons/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml index a5f594ec2..e774d92ed 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-artifacts/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml index 3c432ffbe..2e73c1846 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/features/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml index c6f6cfee8..3ef4deff0 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-api/pom.xml @@ -7,7 +7,7 @@ org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml index 14ebc0e87..6b122fdc5 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-rest/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml index dc1c37978..84401c25d 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-test/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml index d3900d190..ee6558ab7 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound-ui/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml index d61296734..238991c21 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/odl-ovsdb-hwvtepsouthbound/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml index ae7a9f7d6..6b7386c4c 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-features/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 org.opendaylight.ovsdb diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java index 7cab110a2..c5a267f27 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/InstanceIdentifierCodec.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.hwvtepsouthbound; import java.net.URI; +import java.util.Optional; import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -41,13 +42,12 @@ public class InstanceIdentifierCodec extends AbstractModuleStringInstanceIdentif @Override protected Module moduleForPrefix(final String prefix) { - return context.findModuleByName(prefix, null); + return context.findModule(prefix, Optional.empty()).orElse(null); } @Override protected String prefixForNamespace(final URI namespace) { - final Module module = context.findModuleByNamespaceAndRevision(namespace, null); - return module == null ? null : module.getName(); + return context.findModule(namespace, Optional.empty()).map(Module::getName).orElse(null); } @Override diff --git a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationManager.java b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationManager.java index a3a4bd5a4..2b9ec5c5d 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationManager.java +++ b/hwvtepsouthbound/hwvtepsouthbound-impl/src/main/java/org/opendaylight/ovsdb/hwvtepsouthbound/reconciliation/ReconciliationManager.java @@ -56,7 +56,9 @@ public class ReconciliationManager implements AutoCloseable { public ReconciliationManager(final DataBroker db) { this.db = db; - reconcilers = SpecialExecutors.newBoundedCachedThreadPool(NO_OF_RECONCILER, RECON_TASK_QUEUE_SIZE, "ovsdb-reconciler"); + reconcilers = + SpecialExecutors.newBoundedCachedThreadPool(NO_OF_RECONCILER, RECON_TASK_QUEUE_SIZE, "ovsdb-reconciler", + getClass()); ThreadFactory threadFact = new ThreadFactoryBuilder() .setNameFormat("ovsdb-recon-task-triager-%d").build(); diff --git a/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml index 359451ccb..31a38549b 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-it/pom.xml @@ -116,7 +116,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html test - org.codehaus.sonar-plugins.java + org.sonarsource.java sonar-jacoco-listeners test diff --git a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml index 4440f6e7e..882b45395 100644 --- a/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml +++ b/hwvtepsouthbound/hwvtepsouthbound-karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 2.0.5 + 3.0.2 4.0.0 diff --git a/hwvtepsouthbound/pom.xml b/hwvtepsouthbound/pom.xml index dbc80c258..c80e7972f 100644 --- a/hwvtepsouthbound/pom.xml +++ b/hwvtepsouthbound/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/library/artifacts/pom.xml b/library/artifacts/pom.xml index abfc01be6..b298eb23c 100644 --- a/library/artifacts/pom.xml +++ b/library/artifacts/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/library/features/features/pom.xml b/library/features/features/pom.xml index b91a712e5..3887750cc 100644 --- a/library/features/features/pom.xml +++ b/library/features/features/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 2.0.5 + 3.0.2 diff --git a/library/features/odl-ovsdb-library/pom.xml b/library/features/odl-ovsdb-library/pom.xml index af738ff1d..c7f205dbf 100644 --- a/library/features/odl-ovsdb-library/pom.xml +++ b/library/features/odl-ovsdb-library/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/library/features/pom.xml b/library/features/pom.xml index 4a5d94b2a..b0f3e5167 100644 --- a/library/features/pom.xml +++ b/library/features/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 org.opendaylight.ovsdb diff --git a/library/impl/pom.xml b/library/impl/pom.xml index 876ae3e60..6798ee1d1 100644 --- a/library/impl/pom.xml +++ b/library/impl/pom.xml @@ -84,7 +84,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html test - org.codehaus.sonar-plugins.java + org.sonarsource.java sonar-jacoco-listeners ${sonar-jacoco-listeners.version} test diff --git a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java index 9946340c4..3e8276182 100644 --- a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java +++ b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/jsonrpc/JsonRpcDecoder.java @@ -21,6 +21,7 @@ import io.netty.buffer.ByteBufInputStream; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.ByteToMessageDecoder; import java.io.IOException; +import java.io.InputStream; import java.util.List; import org.opendaylight.ovsdb.lib.error.InvalidEncodingException; import org.slf4j.Logger; @@ -105,7 +106,7 @@ public class JsonRpcDecoder extends ByteToMessageDecoder { if (leftCurlies != 0 && leftCurlies == rightCurlies && !inS) { ByteBuf slice = buf.readSlice(1 + index - buf.readerIndex()); - JsonParser jp = jacksonJsonFactory.createParser(new ByteBufInputStream(slice)); + JsonParser jp = jacksonJsonFactory.createParser((InputStream) new ByteBufInputStream(slice)); JsonNode root = jp.readValueAsTree(); out.add(root); leftCurlies = 0; diff --git a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbTypesIdResolver.java b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbTypesIdResolver.java index 0e8819968..76bd04196 100644 --- a/library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbTypesIdResolver.java +++ b/library/impl/src/main/java/org/opendaylight/ovsdb/lib/notation/json/OvsdbTypesIdResolver.java @@ -9,9 +9,9 @@ package org.opendaylight.ovsdb.lib.notation.json; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.databind.DatabindContext; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase; -import com.fasterxml.jackson.databind.type.TypeFactory; import org.opendaylight.ovsdb.lib.notation.OvsdbSet; import org.opendaylight.ovsdb.lib.notation.UUID; @@ -40,11 +40,11 @@ public class OvsdbTypesIdResolver extends TypeIdResolverBase { } @Override - public JavaType typeFromId(String id) { + public JavaType typeFromId(DatabindContext context, String id) { if ("set".equals(id)) { - return TypeFactory.defaultInstance().constructCollectionType(OvsdbSet.class, Object.class); + return context.getTypeFactory().constructCollectionType(OvsdbSet.class, Object.class); } else if ("uuid".equals(id) || "named-uuid".equals(id)) { - return TypeFactory.defaultInstance().constructType(UUID.class); + return context.constructType(UUID.class); } return null; } diff --git a/library/it/pom.xml b/library/it/pom.xml index 7cad54f7f..e1e87dc95 100644 --- a/library/it/pom.xml +++ b/library/it/pom.xml @@ -65,7 +65,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html test - org.codehaus.sonar-plugins.java + org.sonarsource.java sonar-jacoco-listeners test diff --git a/library/karaf/pom.xml b/library/karaf/pom.xml index 8522a2c4f..67a88ad20 100644 --- a/library/karaf/pom.xml +++ b/library/karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 2.0.5 + 3.0.2 4.0.0 diff --git a/library/pom.xml b/library/pom.xml index a69515153..10a55b34c 100644 --- a/library/pom.xml +++ b/library/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/pom.xml b/pom.xml index bafec3577..b2e7271d0 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/schemas/hardwarevtep/pom.xml b/schemas/hardwarevtep/pom.xml index 791cf653b..b68c59cff 100755 --- a/schemas/hardwarevtep/pom.xml +++ b/schemas/hardwarevtep/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent - 2.0.5 + 3.0.2 diff --git a/schemas/openvswitch/pom.xml b/schemas/openvswitch/pom.xml index d8c91604a..8736b6b09 100755 --- a/schemas/openvswitch/pom.xml +++ b/schemas/openvswitch/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent - 2.0.5 + 3.0.2 diff --git a/schemas/pom.xml b/schemas/pom.xml index aaac69ca3..91b086acf 100644 --- a/schemas/pom.xml +++ b/schemas/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/southbound/pom.xml b/southbound/pom.xml index 6bed93cb9..5414db1b5 100644 --- a/southbound/pom.xml +++ b/southbound/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-artifacts/pom.xml b/southbound/southbound-artifacts/pom.xml index 34ef56e08..4d1ca8af3 100644 --- a/southbound/southbound-artifacts/pom.xml +++ b/southbound/southbound-artifacts/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-features/features/pom.xml b/southbound/southbound-features/features/pom.xml index f0f57b7af..f560fcec4 100644 --- a/southbound/southbound-features/features/pom.xml +++ b/southbound/southbound-features/features/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent feature-repo-parent - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml index c15126d86..4f3da9aa7 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-api/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml index cc1f41468..a50f31d13 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-rest/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml index b33ef76f6..aa5c00df5 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl-ui/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml index bebb16677..b1460957d 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-impl/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml b/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml index 71e669323..08e8a9937 100644 --- a/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml +++ b/southbound/southbound-features/odl-ovsdb-southbound-test/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent single-feature-parent - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-features/pom.xml b/southbound/southbound-features/pom.xml index 46e964209..2f8fb6e07 100644 --- a/southbound/southbound-features/pom.xml +++ b/southbound/southbound-features/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/southbound/southbound-impl/pom.xml b/southbound/southbound-impl/pom.xml index 3f4665fa6..32d53ce02 100644 --- a/southbound/southbound-impl/pom.xml +++ b/southbound/southbound-impl/pom.xml @@ -75,7 +75,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html - org.codehaus.sonar-plugins.java + org.sonarsource.java sonar-jacoco-listeners ${sonar-jacoco-listeners.version} test diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java index 8186b46ce..6e4d456db 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodec.java @@ -10,6 +10,7 @@ package org.opendaylight.ovsdb.southbound; import java.net.URI; +import java.util.Optional; import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -45,13 +46,12 @@ public class InstanceIdentifierCodec extends AbstractModuleStringInstanceIdentif @Override protected Module moduleForPrefix(final String prefix) { - return context.findModuleByName(prefix, null); + return context.findModule(prefix, Optional.empty()).orElse(null); } @Override protected String prefixForNamespace(final URI namespace) { - final Module module = context.findModuleByNamespaceAndRevision(namespace, null); - return module == null ? null : module.getName(); + return context.findModule(namespace, Optional.empty()).map(Module::getName).orElse(null); } @Override diff --git a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java index 4b99c5491..7b4292555 100644 --- a/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java +++ b/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/reconciliation/ReconciliationManager.java @@ -95,7 +95,7 @@ public class ReconciliationManager implements AutoCloseable { this.db = db; this.instanceIdentifierCodec = instanceIdentifierCodec; reconcilers = SpecialExecutors.newBoundedCachedThreadPool(NO_OF_RECONCILER, RECON_TASK_QUEUE_SIZE, - "ovsdb-reconciler"); + "ovsdb-reconciler", getClass()); ThreadFactory threadFact = new ThreadFactoryBuilder() .setNameFormat("ovsdb-recon-task-triager-%d").build(); diff --git a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java index 3539daed1..f24946e3e 100644 --- a/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java +++ b/southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/InstanceIdentifierCodecTest.java @@ -18,7 +18,7 @@ import static org.powermock.api.support.membermodification.MemberMatcher.field; import java.net.URI; import java.net.URISyntaxException; -import java.util.Date; +import java.util.Optional; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -75,7 +75,7 @@ public class InstanceIdentifierCodecTest { @Test public void testModuleForPrefix() { Module module = mock(Module.class); - when(context.findModuleByName(anyString(), any(Date.class))).thenReturn(module); + when(context.findModule(anyString(), any(Optional.class))).thenReturn(Optional.of(module)); assertEquals("Error, did not return correct Module object", module, instanceIdCodec.moduleForPrefix("")); } @@ -83,8 +83,8 @@ public class InstanceIdentifierCodecTest { public void testPrefixForNamespace() throws URISyntaxException { Module module = mock(Module.class); URI namespace = new URI(""); - when(context.findModuleByNamespaceAndRevision(any(URI.class), any(Date.class))).thenReturn(null) - .thenReturn(module); + when(context.findModule(any(URI.class), any(Optional.class))).thenReturn(Optional.empty()).thenReturn( + Optional.of(module)); when(module.getName()).thenReturn(""); assertEquals("Error, null should have been returned", null, instanceIdCodec.prefixForNamespace(namespace)); assertEquals("Error, did not return the correct module name", anyString(), diff --git a/southbound/southbound-it/pom.xml b/southbound/southbound-it/pom.xml index ab01b6325..4c1c56e1a 100644 --- a/southbound/southbound-it/pom.xml +++ b/southbound/southbound-it/pom.xml @@ -114,7 +114,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html test - org.codehaus.sonar-plugins.java + org.sonarsource.java sonar-jacoco-listeners test diff --git a/southbound/southbound-karaf/pom.xml b/southbound/southbound-karaf/pom.xml index 2bf7b3fff..630a501da 100644 --- a/southbound/southbound-karaf/pom.xml +++ b/southbound/southbound-karaf/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL org.opendaylight.odlparent karaf4-parent - 2.0.5 + 3.0.2 4.0.0 diff --git a/utils/pom.xml b/utils/pom.xml index 1a21e915a..bcadcf8a9 100644 --- a/utils/pom.xml +++ b/utils/pom.xml @@ -14,7 +14,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 2.0.5 + 3.0.2 diff --git a/utils/yang-utils/pom.xml b/utils/yang-utils/pom.xml index 482d65b44..0cfd879ce 100644 --- a/utils/yang-utils/pom.xml +++ b/utils/yang-utils/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 2.0.5 + 3.0.2 -- 2.36.6