From: Robert Varga Date: Tue, 20 Aug 2019 14:36:13 +0000 (+0200) Subject: Bump odlparent to 6.0.0 X-Git-Tag: release/magnesium~57 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=14c92df74247c884a43c5aaea2f154992b0ec798 Bump odlparent to 6.0.0 This bumps odlparent to 6.0.0 as part of Magnesium MRI. Change-Id: I084c6a32c4facafd85e3b87c6d8a9a29a33848a8 Signed-off-by: Robert Varga --- diff --git a/benchmark/artifacts/pom.xml b/benchmark/artifacts/pom.xml index fe463ced86..978ff11411 100644 --- a/benchmark/artifacts/pom.xml +++ b/benchmark/artifacts/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/benchmark/pom.xml b/benchmark/pom.xml index c328654c3a..9c9f3212dc 100644 --- a/benchmark/pom.xml +++ b/benchmark/pom.xml @@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 org.opendaylight.controller diff --git a/docs/pom.xml b/docs/pom.xml index c8dae9789d..a1c5fd23a7 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent - 5.0.2 + 6.0.0 diff --git a/features/benchmark/features-mdsal-benchmark/pom.xml b/features/benchmark/features-mdsal-benchmark/pom.xml index c03b343083..9b7d089956 100644 --- a/features/benchmark/features-mdsal-benchmark/pom.xml +++ b/features/benchmark/features-mdsal-benchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 5.0.2 + 6.0.0 diff --git a/features/benchmark/odl-benchmark-api/pom.xml b/features/benchmark/odl-benchmark-api/pom.xml index a35af58fa9..06941863ea 100644 --- a/features/benchmark/odl-benchmark-api/pom.xml +++ b/features/benchmark/odl-benchmark-api/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/benchmark/odl-dsbenchmark/pom.xml b/features/benchmark/odl-dsbenchmark/pom.xml index e07d90cefd..1b27d448b1 100644 --- a/features/benchmark/odl-dsbenchmark/pom.xml +++ b/features/benchmark/odl-dsbenchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/benchmark/odl-mdsal-benchmark/pom.xml b/features/benchmark/odl-mdsal-benchmark/pom.xml index efb4241fe0..42d7357a3d 100644 --- a/features/benchmark/odl-mdsal-benchmark/pom.xml +++ b/features/benchmark/odl-mdsal-benchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/benchmark/odl-ntfbenchmark/pom.xml b/features/benchmark/odl-ntfbenchmark/pom.xml index 8f8469ffbd..39ddcd2175 100644 --- a/features/benchmark/odl-ntfbenchmark/pom.xml +++ b/features/benchmark/odl-ntfbenchmark/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/benchmark/pom.xml b/features/benchmark/pom.xml index 9a3a6c125f..0680da69ff 100644 --- a/features/benchmark/pom.xml +++ b/features/benchmark/pom.xml @@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 org.opendaylight.controller diff --git a/features/config-netty/features-config-netty/pom.xml b/features/config-netty/features-config-netty/pom.xml index d7d4663536..92122ac40b 100644 --- a/features/config-netty/features-config-netty/pom.xml +++ b/features/config-netty/features-config-netty/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 5.0.2 + 6.0.0 diff --git a/features/config-netty/odl-config-netty/pom.xml b/features/config-netty/odl-config-netty/pom.xml index 241eb6c5c4..2c7bf017ca 100644 --- a/features/config-netty/odl-config-netty/pom.xml +++ b/features/config-netty/odl-config-netty/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/config-netty/odl-config-netty/src/main/feature/feature.xml b/features/config-netty/odl-config-netty/src/main/feature/feature.xml index 052097b5d7..50a2289c13 100644 --- a/features/config-netty/odl-config-netty/src/main/feature/feature.xml +++ b/features/config-netty/odl-config-netty/src/main/feature/feature.xml @@ -8,6 +8,6 @@ --> - odl-netty-4 + odl-netty-4 diff --git a/features/config-netty/pom.xml b/features/config-netty/pom.xml index 2f144b7cae..b00a9ecc70 100644 --- a/features/config-netty/pom.xml +++ b/features/config-netty/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/features/extras/features-extras/pom.xml b/features/extras/features-extras/pom.xml index 34402162ca..a485301909 100644 --- a/features/extras/features-extras/pom.xml +++ b/features/extras/features-extras/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 5.0.2 + 6.0.0 diff --git a/features/extras/odl-extras-all/pom.xml b/features/extras/odl-extras-all/pom.xml index 6ce00e8a3b..e2f26501b7 100644 --- a/features/extras/odl-extras-all/pom.xml +++ b/features/extras/odl-extras-all/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/extras/odl-jolokia/pom.xml b/features/extras/odl-jolokia/pom.xml index 9bf4e366c3..f12d0071e4 100644 --- a/features/extras/odl-jolokia/pom.xml +++ b/features/extras/odl-jolokia/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/extras/pom.xml b/features/extras/pom.xml index 7dc1eed14d..6b880b5f55 100644 --- a/features/extras/pom.xml +++ b/features/extras/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/features/mdsal/features-mdsal/pom.xml b/features/mdsal/features-mdsal/pom.xml index 3d2b80d342..457285c807 100644 --- a/features/mdsal/features-mdsal/pom.xml +++ b/features/mdsal/features-mdsal/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent feature-repo-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-clustering-test-app/pom.xml b/features/mdsal/odl-clustering-test-app/pom.xml index d8df4b37b2..79d8ca50f4 100644 --- a/features/mdsal/odl-clustering-test-app/pom.xml +++ b/features/mdsal/odl-clustering-test-app/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-controller-binding-api/pom.xml b/features/mdsal/odl-controller-binding-api/pom.xml index ce8d6c9508..9de5f56ea3 100644 --- a/features/mdsal/odl-controller-binding-api/pom.xml +++ b/features/mdsal/odl-controller-binding-api/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-controller-blueprint/pom.xml b/features/mdsal/odl-controller-blueprint/pom.xml index 179e1759de..ec5cecca1e 100644 --- a/features/mdsal/odl-controller-blueprint/pom.xml +++ b/features/mdsal/odl-controller-blueprint/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-controller-dom-api/pom.xml b/features/mdsal/odl-controller-dom-api/pom.xml index 0f256d0b1f..3560bda655 100644 --- a/features/mdsal/odl-controller-dom-api/pom.xml +++ b/features/mdsal/odl-controller-dom-api/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-controller-mdsal-common/pom.xml b/features/mdsal/odl-controller-mdsal-common/pom.xml index 306734c802..5aa669d791 100644 --- a/features/mdsal/odl-controller-mdsal-common/pom.xml +++ b/features/mdsal/odl-controller-mdsal-common/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-controller-model-topology/pom.xml b/features/mdsal/odl-controller-model-topology/pom.xml index 1b5e182823..3b0d22fe68 100644 --- a/features/mdsal/odl-controller-model-topology/pom.xml +++ b/features/mdsal/odl-controller-model-topology/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-mdsal-broker-local/pom.xml b/features/mdsal/odl-mdsal-broker-local/pom.xml index 8a29fe6c1e..3373a7e279 100644 --- a/features/mdsal/odl-mdsal-broker-local/pom.xml +++ b/features/mdsal/odl-mdsal-broker-local/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-mdsal-broker/pom.xml b/features/mdsal/odl-mdsal-broker/pom.xml index 23a09a798a..c1721b05cd 100644 --- a/features/mdsal/odl-mdsal-broker/pom.xml +++ b/features/mdsal/odl-mdsal-broker/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-mdsal-clustering-commons/pom.xml b/features/mdsal/odl-mdsal-clustering-commons/pom.xml index 9ac06c1a40..0eeadc096d 100644 --- a/features/mdsal/odl-mdsal-clustering-commons/pom.xml +++ b/features/mdsal/odl-mdsal-clustering-commons/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml index 71e9e5ad75..907bd59aa0 100644 --- a/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml @@ -8,12 +8,12 @@ --> - odl-akka-system-2.5 - odl-akka-persistence-2.5 - odl-akka-clustering-2.5 - odl-apache-commons-lang3 - odl-dropwizard-metrics - odl-servlet-api + odl-akka-system-2.5 + odl-akka-persistence-2.5 + odl-akka-clustering-2.5 + odl-apache-commons-lang3 + odl-dropwizard-metrics + odl-servlet-api odl-yangtools-data diff --git a/features/mdsal/odl-mdsal-clustering/pom.xml b/features/mdsal/odl-mdsal-clustering/pom.xml index 101bd3e920..82b35c819e 100644 --- a/features/mdsal/odl-mdsal-clustering/pom.xml +++ b/features/mdsal/odl-mdsal-clustering/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-mdsal-distributed-datastore/pom.xml b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml index 9186b65716..1501438ef0 100644 --- a/features/mdsal/odl-mdsal-distributed-datastore/pom.xml +++ b/features/mdsal/odl-mdsal-distributed-datastore/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml b/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml index 3fb7d3f439..bf2fb94a4f 100644 --- a/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml +++ b/features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml @@ -8,7 +8,7 @@ --> - odl-apache-commons-text + odl-apache-commons-text odl-yangtools-codec odl-mdsal-eos-dom odl-mdsal-dom-broker diff --git a/features/mdsal/odl-mdsal-model-inventory/pom.xml b/features/mdsal/odl-mdsal-model-inventory/pom.xml index a51a80b420..d14fa5a769 100644 --- a/features/mdsal/odl-mdsal-model-inventory/pom.xml +++ b/features/mdsal/odl-mdsal-model-inventory/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml index dbefb7c771..5ce755ff53 100644 --- a/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml +++ b/features/mdsal/odl-mdsal-remoterpc-connector/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-message-bus-collector/pom.xml b/features/mdsal/odl-message-bus-collector/pom.xml index 90747b37a7..5564292b3d 100644 --- a/features/mdsal/odl-message-bus-collector/pom.xml +++ b/features/mdsal/odl-message-bus-collector/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/odl-toaster/pom.xml b/features/mdsal/odl-toaster/pom.xml index 18c3b889b4..e526bddfa6 100644 --- a/features/mdsal/odl-toaster/pom.xml +++ b/features/mdsal/odl-toaster/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/features/mdsal/pom.xml b/features/mdsal/pom.xml index d3e79730ef..725b93650e 100644 --- a/features/mdsal/pom.xml +++ b/features/mdsal/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/features/pom.xml b/features/pom.xml index 9eb2c5905a..83d35211dd 100644 --- a/features/pom.xml +++ b/features/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/karaf/pom.xml b/karaf/pom.xml index 23f0270e94..52f70c591b 100644 --- a/karaf/pom.xml +++ b/karaf/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent karaf4-parent - 5.0.2 + 6.0.0 diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml index 6349f7de3a..c0895bf28a 100644 --- a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml +++ b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/archetypes/pom.xml b/opendaylight/archetypes/pom.xml index 1981380d62..62768278f3 100644 --- a/opendaylight/archetypes/pom.xml +++ b/opendaylight/archetypes/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/blueprint/pom.xml b/opendaylight/blueprint/pom.xml index ae5dca2b69..81071f210d 100644 --- a/opendaylight/blueprint/pom.xml +++ b/opendaylight/blueprint/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent bundle-parent - 5.0.2 + 6.0.0 diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java index bb13e13a18..8812650aa6 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/BlueprintBundleTracker.java @@ -7,6 +7,7 @@ */ package org.opendaylight.controller.blueprint; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -130,6 +131,8 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus quiesceParticipantTracker.open(); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private QuiesceParticipant onQuiesceParticipantAdded(final ServiceReference reference) { quiesceParticipant = reference.getBundle().getBundleContext().getService(reference); @@ -140,6 +143,8 @@ public class BlueprintBundleTracker implements BundleActivator, BundleTrackerCus return quiesceParticipant; } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private BlueprintExtenderService onBlueprintExtenderServiceAdded( final ServiceReference reference) { blueprintExtenderService = reference.getBundle().getBundleContext().getService(reference); diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/BindingContext.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/BindingContext.java index 93c46b4c30..2255973786 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/BindingContext.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/BindingContext.java @@ -135,7 +135,7 @@ public abstract class BindingContext { } @SuppressWarnings({ "rawtypes", "unchecked" }) - private static ListBindingContext newInstance(final Class bindingClass, + static ListBindingContext newInstance(final Class bindingClass, final String listKeyValue) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { // We assume the yang list key type is string. diff --git a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java index e781ddd16a..0412f00a7a 100644 --- a/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java +++ b/opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/SpecificReferenceListMetadata.java @@ -9,6 +9,7 @@ package org.opendaylight.controller.blueprint.ext; import com.google.common.collect.ImmutableList; import com.google.common.io.Resources; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.io.IOException; import java.net.URL; import java.nio.charset.StandardCharsets; @@ -60,7 +61,7 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet @Override protected void startTracking() { - BundleTrackerCustomizer bundleListener = new BundleTrackerCustomizer() { + BundleTrackerCustomizer bundleListener = new BundleTrackerCustomizer<>() { @Override public Bundle addingBundle(final Bundle bundle, final BundleEvent event) { bundleAdded(bundle); @@ -87,7 +88,7 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet return; } - ServiceTrackerCustomizer serviceListener = new ServiceTrackerCustomizer() { + ServiceTrackerCustomizer serviceListener = new ServiceTrackerCustomizer<>() { @Override public Object addingService(final ServiceReference reference) { return serviceAdded(reference); @@ -109,6 +110,8 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet serviceTracker.open(); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void bundleAdded(final Bundle bundle) { URL resource = bundle.getEntry(serviceResourcePath); if (resource == null) { @@ -139,6 +142,8 @@ class SpecificReferenceListMetadata extends AbstractDependentComponentFactoryMet } } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private Object serviceAdded(final ServiceReference reference) { Object service = container().getBundleContext().getService(reference); String serviceType = (String) reference.getProperty(OpendaylightNamespaceHandler.TYPE_ATTR); diff --git a/opendaylight/commons/jolokia/pom.xml b/opendaylight/commons/jolokia/pom.xml index d527b51dd7..6f8102eb8c 100644 --- a/opendaylight/commons/jolokia/pom.xml +++ b/opendaylight/commons/jolokia/pom.xml @@ -11,7 +11,7 @@ org.opendaylight.odlparent odlparent - 5.0.2 + 6.0.0 diff --git a/opendaylight/config/config-artifacts/pom.xml b/opendaylight/config/config-artifacts/pom.xml index d372237953..944df44fe0 100644 --- a/opendaylight/config/config-artifacts/pom.xml +++ b/opendaylight/config/config-artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java b/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java index 7162eb6c25..b12fc67609 100644 --- a/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java +++ b/opendaylight/config/netty-event-executor-config/src/main/java/org/opendaylight/controller/config/yang/netty/eventexecutor/AutoCloseableEventExecutor.java @@ -9,6 +9,7 @@ package org.opendaylight.controller.config.yang.netty.eventexecutor; import com.google.common.reflect.AbstractInvocationHandler; import com.google.common.reflect.Reflection; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.netty.util.concurrent.EventExecutor; import io.netty.util.concurrent.GlobalEventExecutor; import io.netty.util.concurrent.ImmediateEventExecutor; @@ -34,12 +35,12 @@ public interface AutoCloseableEventExecutor extends EventExecutor, AutoCloseable } @Override - public void close() throws Exception { + @SuppressFBWarnings(value = "UC_USELESS_VOID_METHOD", justification = "False positive") + public void close() { eventExecutor.shutdownGracefully(0, DEFAULT_SHUTDOWN_SECONDS, TimeUnit.SECONDS); } - - private static AutoCloseableEventExecutor createCloseableProxy(final EventExecutor eventExecutor) { + static AutoCloseableEventExecutor createCloseableProxy(final EventExecutor eventExecutor) { final CloseableEventExecutorMixin closeableEventExecutor = new CloseableEventExecutorMixin(eventExecutor); return Reflection.newProxy(AutoCloseableEventExecutor.class, new AbstractInvocationHandler() { @Override diff --git a/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NioEventLoopGroupCloseable.java b/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NioEventLoopGroupCloseable.java index 51bf1f0e52..1b80ec3b26 100644 --- a/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NioEventLoopGroupCloseable.java +++ b/opendaylight/config/netty-threadgroup-config/src/main/java/org/opendaylight/controller/config/yang/netty/threadgroup/NioEventLoopGroupCloseable.java @@ -10,7 +10,7 @@ package org.opendaylight.controller.config.yang.netty.threadgroup; import io.netty.channel.nio.NioEventLoopGroup; import java.util.concurrent.TimeUnit; -public class NioEventLoopGroupCloseable extends NioEventLoopGroup implements AutoCloseable { +public final class NioEventLoopGroupCloseable extends NioEventLoopGroup implements AutoCloseable { private NioEventLoopGroupCloseable(final int threadCount) { super(threadCount); } @@ -24,10 +24,10 @@ public class NioEventLoopGroupCloseable extends NioEventLoopGroup implements Aut } public static NioEventLoopGroupCloseable newInstance(final Integer threadCount) { - if(threadCount == null || threadCount <= 0) { + if (threadCount == null || threadCount <= 0) { return new NioEventLoopGroupCloseable(); } return new NioEventLoopGroupCloseable(threadCount); } -} \ No newline at end of file +} diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java index a2fb009929..9949e36d37 100644 --- a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java +++ b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/FlexibleThreadPoolWrapper.java @@ -105,6 +105,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable { */ private static class FlexibleRejectionHandler implements RejectedExecutionHandler { @Override + @SuppressWarnings("checkstyle:parameterName") public void rejectedExecution(final Runnable r, final ThreadPoolExecutor executor) { try { executor.getQueue().put(r); @@ -118,7 +119,7 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable { extends com.google.common.util.concurrent.ForwardingBlockingQueue { private final BlockingQueue delegate; - public ForwardingBlockingQueue(final BlockingQueue delegate) { + ForwardingBlockingQueue(final BlockingQueue delegate) { this.delegate = delegate; } @@ -128,7 +129,8 @@ public class FlexibleThreadPoolWrapper implements ThreadPool, Closeable { } @Override - public boolean offer(final Runnable r) { + @SuppressWarnings("checkstyle:parameterName") + public boolean offer(final Runnable o) { // ThreadPoolExecutor will spawn a new thread after core size is reached only // if the queue.offer returns false. return false; diff --git a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java index a85c8244e6..0efa4824ae 100644 --- a/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java +++ b/opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java @@ -28,6 +28,7 @@ public class NamingThreadPoolFactory implements ThreadFactory, Closeable { } @Override + @SuppressWarnings("checkstyle:parameterName") public Thread newThread(final Runnable r) { return new Thread(group, r, String.format("%s-%d", group.getName(), threadName.incrementAndGet())); } diff --git a/opendaylight/md-sal/mdsal-artifacts/pom.xml b/opendaylight/md-sal/mdsal-artifacts/pom.xml index a64620b918..6f8dc85631 100644 --- a/opendaylight/md-sal/mdsal-artifacts/pom.xml +++ b/opendaylight/md-sal/mdsal-artifacts/pom.xml @@ -14,7 +14,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/mdsal-it-base/pom.xml b/opendaylight/md-sal/mdsal-it-base/pom.xml index a25855afac..066054d9d6 100644 --- a/opendaylight/md-sal/mdsal-it-base/pom.xml +++ b/opendaylight/md-sal/mdsal-it-base/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 5.0.2 + 6.0.0 4.0.0 diff --git a/opendaylight/md-sal/mdsal-it-parent/pom.xml b/opendaylight/md-sal/mdsal-it-parent/pom.xml index 46bc170ea7..468743dbce 100644 --- a/opendaylight/md-sal/mdsal-it-parent/pom.xml +++ b/opendaylight/md-sal/mdsal-it-parent/pom.xml @@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent bundle-parent - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/mdsal-trace/dom-impl/src/main/java/org/opendaylight/controller/md/sal/trace/dom/impl/TracingBroker.java b/opendaylight/md-sal/mdsal-trace/dom-impl/src/main/java/org/opendaylight/controller/md/sal/trace/dom/impl/TracingBroker.java index ef05ade7d8..ab633a22b7 100644 --- a/opendaylight/md-sal/mdsal-trace/dom-impl/src/main/java/org/opendaylight/controller/md/sal/trace/dom/impl/TracingBroker.java +++ b/opendaylight/md-sal/mdsal-trace/dom-impl/src/main/java/org/opendaylight/controller/md/sal/trace/dom/impl/TracingBroker.java @@ -225,6 +225,8 @@ public class TracingBroker implements TracingDOMDataBroker { writeWatches.add(watch); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private boolean isRegistrationWatched(YangInstanceIdentifier iid, LogicalDatastoreType store) { if (registrationWatches.isEmpty()) { return true; @@ -275,7 +277,7 @@ public class TracingBroker implements TracingDOMDataBroker { } } - private void reconstructIidPathString(YangInstanceIdentifier yiid, StringBuilder sb) { + private static void reconstructIidPathString(YangInstanceIdentifier yiid, StringBuilder sb) { sb.append(""); for (YangInstanceIdentifier.PathArgument pathArg : yiid.getPathArguments()) { if (pathArg instanceof YangInstanceIdentifier.AugmentationIdentifier) { diff --git a/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml b/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml index 54a154662b..d1c713e23c 100644 --- a/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent feature-repo-parent - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml b/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml index bfe7e41b7b..e3da98a1b5 100644 --- a/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent single-feature-parent - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/mdsal-trace/features/pom.xml b/opendaylight/md-sal/mdsal-trace/features/pom.xml index 3c667a37be..0b21da572e 100644 --- a/opendaylight/md-sal/mdsal-trace/features/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/features/pom.xml @@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/mdsal-trace/pom.xml b/opendaylight/md-sal/mdsal-trace/pom.xml index 0cbb4d1fc6..d930a8eafa 100644 --- a/opendaylight/md-sal/mdsal-trace/pom.xml +++ b/opendaylight/md-sal/mdsal-trace/pom.xml @@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/pom.xml b/opendaylight/md-sal/pom.xml index 656eba58ca..14242d0ca0 100644 --- a/opendaylight/md-sal/pom.xml +++ b/opendaylight/md-sal/pom.xml @@ -5,7 +5,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/sal-binding-api/pom.xml b/opendaylight/md-sal/sal-binding-api/pom.xml index ed34345213..b892219118 100644 --- a/opendaylight/md-sal/sal-binding-api/pom.xml +++ b/opendaylight/md-sal/sal-binding-api/pom.xml @@ -13,6 +13,11 @@ 1.11.0-SNAPSHOT bundle + + + 10 + + org.opendaylight.controller diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java index ec32ff9526..c33a96d888 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/HeliumNotificationProviderServiceWithInterestListeners.java @@ -8,6 +8,7 @@ package org.opendaylight.controller.md.sal.binding.compat; import com.google.common.collect.Sets; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collections; import java.util.Iterator; import java.util.Set; @@ -59,6 +60,8 @@ public class HeliumNotificationProviderServiceWithInterestListeners extends Heli return codec.getNotificationClasses(added); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") @SuppressWarnings("checkstyle:IllegalCatch") private void notifyAllListeners(final Set added) { final Iterator> listeners = diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/ListenerMapGeneration.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/ListenerMapGeneration.java index ef1639cfaf..4581fc0dd8 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/ListenerMapGeneration.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/compat/ListenerMapGeneration.java @@ -13,6 +13,7 @@ import com.google.common.cache.LoadingCache; import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Multimap; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -91,9 +92,10 @@ final class ListenerMapGeneration { return typeToListeners.keySet(); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private static Iterable> getNotificationTypes(final Class cls) { - final Class[] ifaces = cls.getInterfaces(); - return Arrays.stream(ifaces) + return Arrays.stream(cls.getInterfaces()) .filter(input -> !Notification.class.equals(input) && Notification.class.isAssignableFrom(input)) .collect(Collectors.toList()); } diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMTransactionChainAdapter.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMTransactionChainAdapter.java index 2551f7a4e7..23ec35f730 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMTransactionChainAdapter.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/BindingDOMTransactionChainAdapter.java @@ -13,6 +13,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.MoreExecutors; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.opendaylight.controller.md.sal.binding.api.BindingTransactionChain; import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction; import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction; @@ -86,6 +87,8 @@ final class BindingDOMTransactionChainAdapter implements BindingTransactionChain }; } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private FluentFuture listenForFailure( final WriteTransaction tx, final FluentFuture future) { future.addCallback(new FutureCallback() { @@ -103,6 +106,8 @@ final class BindingDOMTransactionChainAdapter implements BindingTransactionChain return future; } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void failTransactionChain(final WriteTransaction tx, final Throwable ex) { /* * We asume correct state change for underlaying transaction diff --git a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ContextReferenceExtractor.java b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ContextReferenceExtractor.java index 8ac865617d..c52d30e34b 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ContextReferenceExtractor.java +++ b/opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/md/sal/binding/impl/ContextReferenceExtractor.java @@ -10,6 +10,7 @@ package org.opendaylight.controller.md.sal.binding.impl; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.lang.reflect.Method; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; @@ -57,6 +58,8 @@ abstract class ContextReferenceExtractor { */ abstract @Nullable InstanceIdentifier extract(DataObject obj); + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private static @NonNull ContextReferenceExtractor create(final Class key) { final Method contextGetter = getContextGetter(key); if (contextGetter == null) { diff --git a/opendaylight/md-sal/sal-binding-dom-it/pom.xml b/opendaylight/md-sal/sal-binding-dom-it/pom.xml index 95e82a9e60..b1cdac6f2e 100644 --- a/opendaylight/md-sal/sal-binding-dom-it/pom.xml +++ b/opendaylight/md-sal/sal-binding-dom-it/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java b/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java index e65461e04b..515bd9d9b7 100644 --- a/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java +++ b/opendaylight/md-sal/sal-cluster-admin-impl/src/main/java/org/opendaylight/controller/cluster/datastore/admin/ClusterAdminRpcService.java @@ -653,6 +653,8 @@ public class ClusterAdminRpcService implements ClusterAdminService { return ask(shardManager, message, SHARD_MGR_TIMEOUT); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") @SuppressWarnings("checkstyle:IllegalCatch") private static void saveSnapshotsToFile(final DatastoreSnapshotList snapshots, final String fileName, final SettableFuture> returnFuture) { diff --git a/opendaylight/md-sal/sal-clustering-config/pom.xml b/opendaylight/md-sal/sal-clustering-config/pom.xml index ef7bf461fa..2e22a87b65 100644 --- a/opendaylight/md-sal/sal-clustering-config/pom.xml +++ b/opendaylight/md-sal/sal-clustering-config/pom.xml @@ -12,7 +12,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizationOperation.java b/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizationOperation.java index fa44c8db84..4dbd7db03e 100644 --- a/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizationOperation.java +++ b/opendaylight/md-sal/sal-common-impl/src/main/java/org/opendaylight/controller/md/sal/common/impl/util/compat/DataNormalizationOperation.java @@ -542,6 +542,8 @@ public abstract class DataNormalizationOperation impleme * otherwise returns a DataNormalizationOperation for child as * call for {@link #fromDataSchemaNode(DataSchemaNode)}. */ + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private static DataNormalizationOperation fromAugmentation(final DataNodeContainer parent, final AugmentationTarget parentAug, final DataSchemaNode child) { AugmentationSchemaNode augmentation = null; diff --git a/opendaylight/md-sal/sal-distributed-datastore/pom.xml b/opendaylight/md-sal/sal-distributed-datastore/pom.xml index 045083f7d9..a53d59139e 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/pom.xml +++ b/opendaylight/md-sal/sal-distributed-datastore/pom.xml @@ -12,6 +12,11 @@ 1.11.0-SNAPSHOT bundle + + + 10 + + diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBroker.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBroker.java index 4ab1c15782..91fd64d366 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBroker.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/AbstractDOMBroker.java @@ -12,6 +12,7 @@ import static com.google.common.base.Preconditions.checkState; import com.google.common.collect.ClassToInstanceMap; import com.google.common.collect.ImmutableClassToInstanceMap; import com.google.common.collect.ImmutableClassToInstanceMap.Builder; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.EnumMap; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; @@ -123,6 +124,8 @@ public abstract class AbstractDOMBroker extends AbstractDOMTransactionFactory canCommitFuture = cohortIterator.next().canCommit(); - Futures.addCallback(canCommitFuture, futureCallback, MoreExecutors.directExecutor()); + Futures.addCallback(cohortIterator.next().canCommit(), futureCallback, MoreExecutors.directExecutor()); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void doPreCommit(final long startTime, final AsyncNotifyingSettableFuture clientSubmitFuture, final DOMDataTreeWriteTransaction transaction, final Collection cohorts) { @@ -160,6 +161,8 @@ public class ConcurrentDOMDataBroker extends AbstractDOMBroker { Futures.addCallback(preCommitFuture, futureCallback, MoreExecutors.directExecutor()); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void doCommit(final long startTime, final AsyncNotifyingSettableFuture clientSubmitFuture, final DOMDataTreeWriteTransaction transaction, final Collection cohorts) { @@ -191,10 +194,11 @@ public class ConcurrentDOMDataBroker extends AbstractDOMBroker { Futures.addCallback(commitFuture, futureCallback, MoreExecutors.directExecutor()); } - @SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", + @SuppressFBWarnings(value = { "BC_UNCONFIRMED_CAST_OF_RETURN_VALUE", "UPM_UNCALLED_PRIVATE_METHOD" }, justification = "Pertains to the assignment of the 'clientException' var. FindBugs flags this as an " + "uncomfirmed cast but the generic type in TransactionCommitFailedExceptionMapper is " - + "TransactionCommitFailedException and thus should be deemed as confirmed.") + + "TransactionCommitFailedException and thus should be deemed as confirmed." + + "Also https://github.com/spotbugs/spotbugs/issues/811") private static void handleException(final AsyncNotifyingSettableFuture clientSubmitFuture, final DOMDataTreeWriteTransaction transaction, final Collection cohorts, diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/DOMBrokerTransactionChain.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/DOMBrokerTransactionChain.java index 537aa46a82..3364d23143 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/DOMBrokerTransactionChain.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/DOMBrokerTransactionChain.java @@ -5,7 +5,6 @@ * 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.controller.cluster.databroker; import static com.google.common.base.Preconditions.checkState; @@ -14,6 +13,7 @@ import static java.util.Objects.requireNonNull; import com.google.common.util.concurrent.FluentFuture; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.MoreExecutors; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Map; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -127,12 +127,16 @@ final class DOMBrokerTransactionChain extends AbstractDOMTransactionFactory results, final State currentState, final State afterState, final CompletableFuture resultFuture) { if (failure != null) { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxy.java index 6ead7c630b..0268b8e36c 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxy.java @@ -14,6 +14,7 @@ import akka.actor.ActorSelection; import akka.actor.PoisonPill; import akka.dispatch.OnComplete; import com.google.common.annotations.VisibleForTesting; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.checkerframework.checker.lock.qual.GuardedBy; import org.opendaylight.controller.cluster.datastore.exceptions.LocalShardNotFoundException; import org.opendaylight.controller.cluster.datastore.messages.CloseDataTreeNotificationListenerRegistration; @@ -86,6 +87,8 @@ final class DataTreeChangeListenerProxy ext }, actorUtils.getClientDispatcher()); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void setListenerRegistrationActor(final ActorSelection actor) { if (actor == null) { LOG.debug("{}: Ignoring null actor on {}", logContext(), this); @@ -103,6 +106,8 @@ final class DataTreeChangeListenerProxy ext actor.tell(CloseDataTreeNotificationListenerRegistration.getInstance(), null); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void doRegistration(final ActorRef shard) { Future future = actorUtils.executeOperationAsync(shard, diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java index c8372e409e..9c0d1ca569 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActor.java @@ -14,6 +14,7 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -75,7 +76,7 @@ final class DataTreeCohortActor extends AbstractUntypedActor { return txId; } - protected CommitProtocolCommand(TransactionIdentifier txId) { + protected CommitProtocolCommand(final TransactionIdentifier txId) { this.txId = Objects.requireNonNull(txId); } @@ -91,8 +92,8 @@ final class DataTreeCohortActor extends AbstractUntypedActor { private final ActorRef cohort; private final SchemaContext schema; - CanCommit(TransactionIdentifier txId, Collection candidates, SchemaContext schema, - ActorRef cohort) { + CanCommit(final TransactionIdentifier txId, final Collection candidates, + final SchemaContext schema, final ActorRef cohort) { super(txId); this.cohort = Objects.requireNonNull(cohort); this.candidates = Objects.requireNonNull(candidates); @@ -122,7 +123,7 @@ final class DataTreeCohortActor extends AbstractUntypedActor { private final ActorRef cohortRef; private final TransactionIdentifier txId; - protected CommitReply(ActorRef cohortRef, TransactionIdentifier txId) { + protected CommitReply(final ActorRef cohortRef, final TransactionIdentifier txId) { this.cohortRef = Objects.requireNonNull(cohortRef); this.txId = Objects.requireNonNull(txId); } @@ -143,28 +144,28 @@ final class DataTreeCohortActor extends AbstractUntypedActor { static final class Success extends CommitReply { - Success(ActorRef cohortRef, TransactionIdentifier txId) { + Success(final ActorRef cohortRef, final TransactionIdentifier txId) { super(cohortRef, txId); } } static final class PreCommit extends CommitProtocolCommand { - PreCommit(TransactionIdentifier txId) { + PreCommit(final TransactionIdentifier txId) { super(txId); } } static final class Abort extends CommitProtocolCommand { - Abort(TransactionIdentifier txId) { + Abort(final TransactionIdentifier txId) { super(txId); } } static final class Commit extends CommitProtocolCommand { - Commit(TransactionIdentifier txId) { + Commit(final TransactionIdentifier txId) { super(txId); } } @@ -172,11 +173,11 @@ final class DataTreeCohortActor extends AbstractUntypedActor { private abstract class CohortBehaviour, S extends ThreePhaseCommitStep> { private final Class handledMessageType; - CohortBehaviour(Class handledMessageType) { + CohortBehaviour(final Class handledMessageType) { this.handledMessageType = Objects.requireNonNull(handledMessageType); } - void handle(CommitProtocolCommand command) { + void handle(final CommitProtocolCommand command) { if (handledMessageType.isInstance(command)) { onMessage(command); } else if (command instanceof Abort) { @@ -188,7 +189,7 @@ final class DataTreeCohortActor extends AbstractUntypedActor { } } - private void onMessage(CommitProtocolCommand message) { + private void onMessage(final CommitProtocolCommand message) { final ActorRef sender = getSender(); TransactionIdentifier txId = message.getTxId(); ListenableFuture future = process(handledMessageType.cast(message)); @@ -196,38 +197,42 @@ final class DataTreeCohortActor extends AbstractUntypedActor { : DataTreeCohortActor.this::executeInSelf; Futures.addCallback(future, new FutureCallback() { @Override - public void onSuccess(S nextStep) { + public void onSuccess(final S nextStep) { success(txId, sender, nextStep); } @Override - public void onFailure(Throwable failure) { + public void onFailure(final Throwable failure) { failed(txId, sender, failure); } }, callbackExecutor); } - private void failed(TransactionIdentifier txId, ActorRef sender, Throwable failure) { + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") + private void failed(final TransactionIdentifier txId, final ActorRef sender, final Throwable failure) { currentStateMap.remove(txId); sender.tell(new Status.Failure(failure), getSelf()); } - private void success(TransactionIdentifier txId, ActorRef sender, S nextStep) { + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") + private void success(final TransactionIdentifier txId, final ActorRef sender, final S nextStep) { currentStateMap.computeIfPresent(txId, (key, behaviour) -> nextBehaviour(txId, nextStep)); sender.tell(new Success(getSelf(), txId), getSelf()); } - private void onAbort(TransactionIdentifier txId) { + private void onAbort(final TransactionIdentifier txId) { currentStateMap.remove(txId); final ActorRef sender = getSender(); Futures.addCallback(abort(), new FutureCallback() { @Override - public void onSuccess(Object noop) { + public void onSuccess(final Object noop) { sender.tell(new Success(getSelf(), txId), getSelf()); } @Override - public void onFailure(Throwable failure) { + public void onFailure(final Throwable failure) { LOG.warn("Abort of transaction {} failed for cohort {}", txId, cohort, failure); sender.tell(new Status.Failure(failure), getSelf()); } @@ -252,12 +257,12 @@ final class DataTreeCohortActor extends AbstractUntypedActor { } @Override - ListenableFuture process(CanCommit message) { + ListenableFuture process(final CanCommit message) { return cohort.canCommit(message.getTxId(), message.getSchema(), message.getCandidates()); } @Override - CohortBehaviour nextBehaviour(TransactionIdentifier txId, PostCanCommitStep nextStep) { + CohortBehaviour nextBehaviour(final TransactionIdentifier txId, final PostCanCommitStep nextStep) { return new PostCanCommit(txId, nextStep); } @@ -272,7 +277,7 @@ final class DataTreeCohortActor extends AbstractUntypedActor { private final S step; private final TransactionIdentifier txId; - CohortStateWithStep(Class handledMessageType, TransactionIdentifier txId, S step) { + CohortStateWithStep(final Class handledMessageType, final TransactionIdentifier txId, final S step) { super(handledMessageType); this.txId = Objects.requireNonNull(txId); this.step = Objects.requireNonNull(step); @@ -295,18 +300,18 @@ final class DataTreeCohortActor extends AbstractUntypedActor { private class PostCanCommit extends CohortStateWithStep { - PostCanCommit(TransactionIdentifier txId, PostCanCommitStep nextStep) { + PostCanCommit(final TransactionIdentifier txId, final PostCanCommitStep nextStep) { super(PreCommit.class, txId, nextStep); } @SuppressWarnings("unchecked") @Override - ListenableFuture process(PreCommit message) { + ListenableFuture process(final PreCommit message) { return (ListenableFuture) getStep().preCommit(); } @Override - CohortBehaviour nextBehaviour(TransactionIdentifier txId, PostPreCommitStep nextStep) { + CohortBehaviour nextBehaviour(final TransactionIdentifier txId, final PostPreCommitStep nextStep) { return new PostPreCommit(txId, nextStep); } @@ -314,18 +319,18 @@ final class DataTreeCohortActor extends AbstractUntypedActor { private class PostPreCommit extends CohortStateWithStep { - PostPreCommit(TransactionIdentifier txId, PostPreCommitStep step) { + PostPreCommit(final TransactionIdentifier txId, final PostPreCommitStep step) { super(Commit.class, txId, step); } @SuppressWarnings("unchecked") @Override - ListenableFuture process(Commit message) { + ListenableFuture process(final Commit message) { return (ListenableFuture) getStep().commit(); } @Override - CohortBehaviour nextBehaviour(TransactionIdentifier txId, NoopThreePhaseCommitStep nextStep) { + CohortBehaviour nextBehaviour(final TransactionIdentifier txId, final NoopThreePhaseCommitStep nextStep) { return null; } } diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortRegistrationProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortRegistrationProxy.java index 0b6f143583..e5f4ceaa7e 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortRegistrationProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortRegistrationProxy.java @@ -13,6 +13,7 @@ import akka.actor.ActorRef; import akka.dispatch.OnComplete; import akka.pattern.Patterns; import akka.util.Timeout; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.concurrent.TimeUnit; import org.checkerframework.checker.lock.qual.GuardedBy; import org.opendaylight.controller.cluster.datastore.exceptions.LocalShardNotFoundException; @@ -65,6 +66,8 @@ public class DataTreeCohortRegistrationProxy }, actorUtils.getClientDispatcher()); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private synchronized void performRegistration(final ActorRef shard) { if (isClosed()) { return; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextSupport.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextSupport.java index 7be72393a2..4276f3be52 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextSupport.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/RemoteTransactionContextSupport.java @@ -14,6 +14,7 @@ import akka.actor.ActorSelection; import akka.dispatch.OnComplete; import akka.pattern.AskTimeoutException; import akka.util.Timeout; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.concurrent.TimeUnit; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import org.opendaylight.controller.cluster.datastore.exceptions.NoShardLeaderException; @@ -151,6 +152,8 @@ final class RemoteTransactionContextSupport { }, getActorUtils().getClientDispatcher()); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void onFindPrimaryShardComplete(final Throwable failure, final PrimaryShardInfo newPrimaryShardInfo) { if (failure == null) { this.primaryShardInfo = newPrimaryShardInfo; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java index 2d57c2a8af..5f82584f85 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortProxy.java @@ -17,6 +17,7 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -142,6 +143,8 @@ public class ThreePhaseCommitCohortProxy extends AbstractThreePhaseCommitCohort< return returnFuture; } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void finishCanCommit(final SettableFuture returnFuture) { LOG.debug("Tx {} finishCanCommit", transactionId); diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipService.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipService.java index c2e4aab5a4..ca9ef6338d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipService.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/DistributedEntityOwnershipService.java @@ -24,6 +24,7 @@ import java.util.Optional; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; import org.opendaylight.controller.cluster.access.concepts.MemberName; import org.opendaylight.controller.cluster.datastore.config.Configuration; import org.opendaylight.controller.cluster.datastore.config.ModuleShardConfiguration; @@ -218,21 +219,28 @@ public class DistributedEntityOwnershipService implements DOMEntityOwnershipServ @SuppressWarnings("checkstyle:IllegalCatch") @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Akka's Await.result() API contract") DataTree getLocalEntityOwnershipShardDataTree() { - if (localEntityOwnershipShardDataTree == null) { - try { - if (localEntityOwnershipShard == null) { - localEntityOwnershipShard = Await.result(context.findLocalShardAsync( - ENTITY_OWNERSHIP_SHARD_NAME), Duration.Inf()); - } + final DataTree local = localEntityOwnershipShardDataTree; + if (local != null) { + return local; + } - localEntityOwnershipShardDataTree = (DataTree) Await.result(Patterns.ask(localEntityOwnershipShard, - GetShardDataTree.INSTANCE, MESSAGE_TIMEOUT), Duration.Inf()); - } catch (Exception e) { + if (localEntityOwnershipShard == null) { + try { + localEntityOwnershipShard = Await.result(context.findLocalShardAsync( + ENTITY_OWNERSHIP_SHARD_NAME), Duration.Inf()); + } catch (TimeoutException | InterruptedException e) { LOG.error("Failed to find local {} shard", ENTITY_OWNERSHIP_SHARD_NAME, e); + return null; } } - return localEntityOwnershipShardDataTree; + try { + return localEntityOwnershipShardDataTree = (DataTree) Await.result(Patterns.ask(localEntityOwnershipShard, + GetShardDataTree.INSTANCE, MESSAGE_TIMEOUT), Duration.Inf()); + } catch (TimeoutException | InterruptedException e) { + LOG.error("Failed to find local {} shard", ENTITY_OWNERSHIP_SHARD_NAME, e); + return null; + } } void unregisterListener(final String entityType, final DOMEntityOwnershipListener listener) { diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java index 77a0e88393..fee555470f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java @@ -35,6 +35,7 @@ import akka.persistence.SnapshotOffer; import akka.persistence.SnapshotSelectionCriteria; import akka.util.Timeout; import com.google.common.annotations.VisibleForTesting; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -425,6 +426,8 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering { } } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void removePrefixShardReplica(final RemovePrefixShardReplica contextMessage, final String shardName, final String primaryPath, final ActorRef sender) { if (isShardReplicaOperationInProgress(shardName, sender)) { @@ -466,6 +469,8 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering { }, new Dispatchers(context().system().dispatchers()).getDispatcher(Dispatchers.DispatcherType.Client)); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void removeShardReplica(final RemoveShardReplica contextMessage, final String shardName, final String primaryPath, final ActorRef sender) { if (isShardReplicaOperationInProgress(shardName, sender)) { @@ -1288,10 +1293,10 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering { } @VisibleForTesting - ShardInformation createShardInfoFor(String shardName, ShardIdentifier shardId, - Map peerAddresses, - DatastoreContext datastoreContext, - Map shardSnapshots) { + ShardInformation createShardInfoFor(final String shardName, final ShardIdentifier shardId, + final Map peerAddresses, + final DatastoreContext datastoreContext, + final Map shardSnapshots) { return new ShardInformation(shardName, shardId, peerAddresses, datastoreContext, Shard.builder().restoreFromSnapshot(shardSnapshots.get(shardName)), peerAddressResolver); @@ -1428,12 +1433,16 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering { }); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void sendLocalReplicaAlreadyExistsReply(final String shardName, final ActorRef sender) { LOG.debug("{}: Local shard {} already exists", persistenceId(), shardName); sender.tell(new Status.Failure(new AlreadyExistsException( String.format("Local shard %s already exists", shardName))), getSelf()); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void addPrefixShard(final String shardName, final YangInstanceIdentifier shardPrefix, final RemotePrimaryShardFound response, final ActorRef sender) { if (isShardReplicaOperationInProgress(shardName, sender)) { @@ -1468,6 +1477,8 @@ class ShardManager extends AbstractUntypedPersistentActorWithMetering { execAddShard(shardName, shardInfo, response, removeShardOnFailure, sender); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void addShard(final String shardName, final RemotePrimaryShardFound response, final ActorRef sender) { if (isShardReplicaOperationInProgress(shardName, sender)) { return; diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorUtils.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorUtils.java index 3007e4b187..b1deffefb7 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorUtils.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorUtils.java @@ -23,6 +23,7 @@ import com.codahale.metrics.MetricRegistry; import com.codahale.metrics.Timer; import com.google.common.base.Preconditions; import com.google.common.base.Strings; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Optional; import java.util.concurrent.TimeUnit; import java.util.function.Function; @@ -241,6 +242,8 @@ public class ActorUtils { }, FIND_PRIMARY_FAILURE_TRANSFORMER, getClientDispatcher()); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private PrimaryShardInfo onPrimaryShardFound(final String shardName, final String primaryActorPath, final short primaryVersion, final ReadOnlyDataTree localShardDataTree) { ActorSelection actorSelection = actorSystem.actorSelection(primaryActorPath); diff --git a/opendaylight/md-sal/sal-dom-api/pom.xml b/opendaylight/md-sal/sal-dom-api/pom.xml index 68aca9879b..ec20cc7411 100644 --- a/opendaylight/md-sal/sal-dom-api/pom.xml +++ b/opendaylight/md-sal/sal-dom-api/pom.xml @@ -13,6 +13,11 @@ 1.11.0-SNAPSHOT bundle + + + 10 + + org.opendaylight.controller diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataBrokerTransactionChainImpl.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataBrokerTransactionChainImpl.java index 6e11c5f5bf..d7f9bdc300 100755 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataBrokerTransactionChainImpl.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataBrokerTransactionChainImpl.java @@ -15,6 +15,7 @@ import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Collection; import java.util.Map; import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; @@ -132,12 +133,16 @@ final class DOMDataBrokerTransactionChainImpl extends listener.onTransactionChainSuccessful(this); } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void transactionCompleted() { if (COUNTER_UPDATER.decrementAndGet(this) == 0 && state == State.CLOSING) { finishClose(); } } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private void transactionFailed(final DOMDataWriteTransaction tx, final Throwable cause) { state = State.FAILED; LOG.debug("Transaction chain {} failed.", this, cause); diff --git a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java index e2bf680014..b0a62c5dfd 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java +++ b/opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java @@ -20,6 +20,7 @@ import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.SettableFuture; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.EnumMap; import java.util.LinkedList; import java.util.Map; @@ -186,8 +187,10 @@ class ShardedDOMDataBrokerDelegatingReadWriteTransaction implements DOMDataReadW : DataTreeConfiguration.DEFAULT_OPERATIONAL; } + @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD", + justification = "https://github.com/spotbugs/spotbugs/issues/811") private static void applyModificationHistoryToSnapshot(final DataTreeModification dataTreeModification, - final Queue modificationHistory) { + final Queue modificationHistory) { while (!modificationHistory.isEmpty()) { final Modification modification = modificationHistory.poll(); switch (modification.getOperation()) { diff --git a/opendaylight/model/pom.xml b/opendaylight/model/pom.xml index 04660d894b..4779f34baa 100644 --- a/opendaylight/model/pom.xml +++ b/opendaylight/model/pom.xml @@ -13,7 +13,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 diff --git a/pom.xml b/pom.xml index e88024aed2..4c8f065d41 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.opendaylight.odlparent odlparent-lite - 5.0.2 + 6.0.0 org.opendaylight.controller