Bump odlparent to 5.0.0 28/81128/25
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 22 Mar 2019 18:31:50 +0000 (19:31 +0100)
committerRobert Varga <nite@hq.sk>
Tue, 16 Apr 2019 08:13:31 +0000 (08:13 +0000)
This bumps odlparent references to 5.0.0, removing use of the JSR305
remnants. Also a useless javadoc plugin override is removed.

Change-Id: Iae5355e49115afdd73b60bd26ac85f7f542bbff8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
111 files changed:
benchmark/artifacts/pom.xml
benchmark/pom.xml
docs/pom.xml
features/benchmark/features-mdsal-benchmark/pom.xml
features/benchmark/odl-benchmark-api/pom.xml
features/benchmark/odl-dsbenchmark/pom.xml
features/benchmark/odl-mdsal-benchmark/pom.xml
features/benchmark/odl-ntfbenchmark/pom.xml
features/benchmark/pom.xml
features/config-netty/features-config-netty/pom.xml
features/config-netty/odl-config-netty/pom.xml
features/config-netty/odl-config-netty/src/main/feature/feature.xml
features/config-netty/pom.xml
features/extras/features-extras/pom.xml
features/extras/odl-extras-all/pom.xml
features/extras/odl-jolokia/pom.xml
features/extras/pom.xml
features/mdsal/features-mdsal/pom.xml
features/mdsal/odl-clustering-test-app/pom.xml
features/mdsal/odl-controller-mdsal-common/pom.xml
features/mdsal/odl-controller-model-topology/pom.xml
features/mdsal/odl-mdsal-all/pom.xml
features/mdsal/odl-mdsal-broker-local/pom.xml
features/mdsal/odl-mdsal-broker-local/src/main/feature/feature.xml
features/mdsal/odl-mdsal-broker/pom.xml
features/mdsal/odl-mdsal-clustering-commons/pom.xml
features/mdsal/odl-mdsal-clustering-commons/src/main/feature/feature.xml
features/mdsal/odl-mdsal-clustering/pom.xml
features/mdsal/odl-mdsal-distributed-datastore/pom.xml
features/mdsal/odl-mdsal-distributed-datastore/src/main/feature/feature.xml
features/mdsal/odl-mdsal-model-inventory/pom.xml
features/mdsal/odl-mdsal-remoterpc-connector/pom.xml
features/mdsal/odl-mdsal-remoterpc-connector/src/main/feature/feature.xml
features/mdsal/odl-message-bus-collector/pom.xml
features/mdsal/odl-toaster/pom.xml
features/mdsal/pom.xml
features/pom.xml
karaf/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml
opendaylight/archetypes/pom.xml
opendaylight/blueprint/pom.xml
opendaylight/blueprint/src/main/java/org/opendaylight/controller/blueprint/ext/AbstractDependentComponentFactoryMetadata.java
opendaylight/commons/jolokia/pom.xml
opendaylight/config/threadpool-config-impl/src/main/java/org/opendaylight/controller/config/threadpool/util/NamingThreadPoolFactory.java
opendaylight/md-sal/cds-access-api/src/main/java/org/opendaylight/controller/cluster/access/commands/ModifyTransactionRequestBuilder.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AbstractClientConnection.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/AveragingProgressTracker.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorBehavior.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ClientActorContext.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ConnectedClientConnection.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/ProgressTracker.java
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/TransmitQueue.java
opendaylight/md-sal/mdsal-artifacts/pom.xml
opendaylight/md-sal/mdsal-it-base/pom.xml
opendaylight/md-sal/mdsal-it-parent/pom.xml
opendaylight/md-sal/mdsal-trace/dom-impl/src/main/java/org/opendaylight/controller/md/sal/trace/closetracker/impl/CloseTrackedRegistry.java
opendaylight/md-sal/mdsal-trace/features/features-mdsal-trace/pom.xml
opendaylight/md-sal/mdsal-trace/features/odl-mdsal-trace/pom.xml
opendaylight/md-sal/mdsal-trace/features/pom.xml
opendaylight/md-sal/mdsal-trace/pom.xml
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-binding-dom-it/pom.xml
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/common/actor/MessageTracker.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/util/AbstractDataTreeModificationCursor.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/io/FileBackedOutputStream.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/messaging/AssembledMessageState.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/messaging/SlicedMessageState.java
opendaylight/md-sal/sal-clustering-config/pom.xml
opendaylight/md-sal/sal-distributed-datastore/pom.xml
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/ClientBackedTransactionChain.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractClientHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractShardBackendResolver.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadOnlyProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/LocalReadWriteProxyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/ModuleShardBackendResolver.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/ProxyHistory.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/ShardBackendInfo.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/SimpleShardBackendResolver.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/VotingFuture.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractShardDataTreeNotificationPublisherActorProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractShardDataTreeTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortActorRegistry.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataTreeCohortRegistrationProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospector.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DefaultShardDataTreeChangeListenerPublisher.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DelayedDataTreeChangeListenerRegistration.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendClientMetadataBuilder.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendMetadata.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendReadOnlyTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendReadWriteTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/FrontendTransaction.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LeaderFrontendState.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeChangeListenerPublisherActorProxy.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardDataTreeTransactionChain.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/TransactionContextWrapper.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/entityownership/EntityOwnershipListenerSupport.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/jmx/mbeans/shard/ShardStats.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ShardLeaderStateChanged.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardChangePublisher.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardFrontend.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/LookupTask.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/AbstractProxyTransactionTest.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/PingPongTransactionChain.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/legacy/sharded/adapter/ShardedDOMDataBrokerDelegatingReadWriteTransaction.java
opendaylight/model/pom.xml
pom.xml

index 565adb9..a2e9ce1 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index ce54e35..595b330 100644 (file)
@@ -9,7 +9,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.controller</groupId>
index 4b2399c..2d4b212 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>sal-clustering-commons</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.opendaylight.controller</groupId>
-            <artifactId>sal-clustering-config</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.opendaylight.controller</groupId>
             <artifactId>sal-distributed-datastore</artifactId>
             </plugin>
             <plugin>
                 <artifactId>maven-javadoc-plugin</artifactId>
-                    <!-- FIXME: remove override once odlparent ships 3.1.0+ -->
-                <version>3.0.0</version>
                 <executions>
                     <execution>
                         <id>attach-javadocs</id>
index 14021d1..bc4018a 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 247bfe2..e7ae979 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 55cacd9..7514c49 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 0696365..8330854 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 62c089b..5c5dd85 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 0b7c823..db9a362 100644 (file)
@@ -10,7 +10,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
     <groupId>org.opendaylight.controller</groupId>
index 2cbf46e..b559aed 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 7e382ee..3ea5dad 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index e4048a9..931e699 100644 (file)
@@ -8,7 +8,7 @@
  -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-config-netty">
     <feature name="odl-config-netty">
-        <feature version="[4,5)">odl-guava</feature>
-        <feature version="[4,5)">odl-netty-4</feature>
+        <feature version="[5,6)">odl-guava</feature>
+        <feature version="[5,6)">odl-netty-4</feature>
     </feature>
 </features>
index 5203030..c5d37ef 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index d7c78e8..1a8f0fd 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index c4326f5..7ab2ba7 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 980bd61..5edee6c 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 2311080..646872e 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 3b6fba4..99faee1 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 1a461fd..6e0ea45 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index af63eab..fdb96f1 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 3a35a45..ae94f98 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index b70a21d..e5d21fd 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 6beb66e..82daf29 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
@@ -25,6 +25,8 @@
 
     <properties>
         <blueprint.version>0.11.0-SNAPSHOT</blueprint.version>
+        <!-- CONTROLLER-1584 -->
+        <skip.karaf.featureTest>true</skip.karaf.featureTest>
     </properties>
 
     <dependencyManagement>
index accea8b..6d51823 100644 (file)
@@ -8,7 +8,7 @@
  -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.2.0" name="odl-mdsal-${project.version}">
     <feature name="odl-mdsal-broker-local" version="${project.version}">
-        <feature version="[4,5)">odl-lmax-3</feature>
+        <feature version="[5,6)">odl-lmax-3</feature>
         <feature version="[2.1,3)">odl-yangtools-codec</feature>
         <bundle start-level="40">mvn:org.opendaylight.controller/blueprint/${blueprint.version}</bundle>
     </feature>
index 753dfc6..9c4f959 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index b5cf579..7b86107 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
     <version>1.10.0-SNAPSHOT</version>
     <packaging>feature</packaging>
 
+    <properties>
+        <!-- CONTROLLER-1584 -->
+        <skip.karaf.featureTest>true</skip.karaf.featureTest>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
index 00c2e52..85426c1 100644 (file)
@@ -8,11 +8,11 @@
   -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
     <feature name="odl-mdsal-clustering-commons" version="${project.version}">
-        <feature version="[4,5)">odl-akka-system-2.5</feature>
-        <feature version="[4,5)">odl-akka-persistence-2.5</feature>
-        <feature version="[4,5)">odl-akka-clustering-2.5</feature>
-        <feature version="[4,5)">odl-apache-commons-lang3</feature>
-        <feature version="[4.0.8,5)">odl-dropwizard-metrics</feature>
-        <feature version="[4,5)">odl-servlet-api</feature>
+        <feature version="[5,6)">odl-akka-system-2.5</feature>
+        <feature version="[5,6)">odl-akka-persistence-2.5</feature>
+        <feature version="[5,6)">odl-akka-clustering-2.5</feature>
+        <feature version="[5,6)">odl-apache-commons-lang3</feature>
+        <feature version="[5,6)">odl-dropwizard-metrics</feature>
+        <feature version="[5,6)">odl-servlet-api</feature>
     </feature>
 </features>
index b7c0bf3..d5d7b3a 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 1bc682c..636ca4e 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
     <version>1.10.0-SNAPSHOT</version>
     <packaging>feature</packaging>
 
+    <properties>
+        <!-- CONTROLLER-1584 -->
+        <skip.karaf.featureTest>true</skip.karaf.featureTest>
+    </properties>
+
     <dependencyManagement>
         <dependencies>
             <dependency>
index 7716205..96d8ffe 100644 (file)
@@ -8,6 +8,6 @@
   -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
     <feature name="odl-mdsal-distributed-datastore" version="${project.version}">
-        <feature version="[4,5)">odl-apache-commons-text</feature>
+        <feature version="[5,6)">odl-apache-commons-text</feature>
     </feature>
 </features>
index 22c3aa9..afa75c9 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 20813fe..4142290 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
     <version>1.10.0-SNAPSHOT</version>
     <packaging>feature</packaging>
 
+    <properties>
+        <!-- CONTROLLER-1584 -->
+        <skip.karaf.featureTest>true</skip.karaf.featureTest>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>${project.groupId}</groupId>
@@ -39,7 +44,7 @@
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
             <artifactId>odl-akka-leveldb-0.10</artifactId>
-            <version>4.0.9</version>
+            <version>5.0.0</version>
             <type>xml</type>
             <classifier>features</classifier>
         </dependency>
index 9079aa9..b4f9bcb 100644 (file)
@@ -8,6 +8,6 @@
   -->
 <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="odl-controller-${project.version}">
     <feature name="odl-mdsal-remoterpc-connector" version="${project.version}">
-        <feature version="[4,5)">odl-akka-leveldb-0.10</feature>
+        <feature version="[5,6)">odl-akka-leveldb-0.10</feature>
     </feature>
 </features>
index 17c5b8a..7a983e4 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 51811fa..32924ed 100644 (file)
@@ -12,7 +12,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 7dbb5de..cec66b3 100644 (file)
@@ -11,7 +11,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index b443f88..ca94643 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 141c521..dcb73b6 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf4-parent</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 7d0076c..62e2700 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index f557e42..79ab937 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 30e6262..660648f 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index b7953e4..c47db3a 100644 (file)
@@ -14,12 +14,12 @@ import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.GuardedBy;
 import org.apache.aries.blueprint.di.AbstractRecipe;
 import org.apache.aries.blueprint.di.ExecutionContext;
 import org.apache.aries.blueprint.di.Recipe;
 import org.apache.aries.blueprint.ext.DependentComponentFactoryMetadata;
 import org.apache.aries.blueprint.services.ExtendedBlueprintContainer;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.blueprint.BlueprintContainerRestartService;
 import org.osgi.framework.ServiceReference;
index be3eb1a..76120d5 100644 (file)
@@ -11,7 +11,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 3f5a6dd..a85c824 100644 (file)
@@ -5,33 +5,30 @@
  * 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.config.threadpool.util;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
 import java.io.Closeable;
 import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.atomic.AtomicLong;
-import javax.annotation.concurrent.ThreadSafe;
 
 /**
- * Implementation of {@link ThreadFactory}.
+ * Implementation of {@link ThreadFactory}. This class is thread-safe.
  */
-@ThreadSafe
 public class NamingThreadPoolFactory implements ThreadFactory, Closeable {
 
     private final ThreadGroup group;
     private final String namePrefix;
     private final AtomicLong threadName = new AtomicLong();
 
-    public NamingThreadPoolFactory(String namePrefix) {
-        Preconditions.checkNotNull(namePrefix);
+    public NamingThreadPoolFactory(final String namePrefix) {
+        this.namePrefix = requireNonNull(namePrefix);
         this.group = new ThreadGroup(namePrefix);
-        this.namePrefix = namePrefix;
     }
 
     @Override
-    public Thread newThread(Runnable r) {
+    public Thread newThread(final Runnable r) {
         return new Thread(group, r, String.format("%s-%d", group.getName(), threadName.incrementAndGet()));
     }
 
@@ -42,5 +39,4 @@ public class NamingThreadPoolFactory implements ThreadFactory, Closeable {
     public String getNamePrefix() {
         return namePrefix;
     }
-
 }
index 9312e4c..8a04936 100644 (file)
@@ -12,19 +12,18 @@ import com.google.common.annotations.Beta;
 import com.google.common.base.Preconditions;
 import java.util.ArrayList;
 import java.util.List;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.yangtools.concepts.Builder;
 import org.opendaylight.yangtools.concepts.Identifiable;
 
 /**
  * A reusable {@link Builder} for creating {@link ModifyTransactionRequest} message instances. Its internal state is
- * reset when {@link #build()} is invoked, hence it can be used to create a sequence of messages.
+ * reset when {@link #build()} is invoked, hence it can be used to create a sequence of messages. This class is NOT
+ * thread-safe.
  *
  * @author Robert Varga
  */
 @Beta
-@NotThreadSafe
 public final class ModifyTransactionRequestBuilder implements Builder<ModifyTransactionRequest>,
         Identifiable<TransactionIdentifier> {
     private final List<TransactionModification> modifications = new ArrayList<>(1);
index 03d4691..361027a 100644 (file)
@@ -21,8 +21,8 @@ import java.util.concurrent.TimeoutException;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.GuardedBy;
-import javax.annotation.concurrent.NotThreadSafe;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.cluster.access.concepts.Request;
 import org.opendaylight.controller.cluster.access.concepts.RequestException;
@@ -36,11 +36,10 @@ import scala.concurrent.duration.FiniteDuration;
 /**
  * Base class for a connection to the backend. Responsible to queueing and dispatch of requests toward the backend.
  * Can be in three conceptual states: Connecting, Connected and Reconnecting, which are represented by public final
- * classes exposed from this package.
+ * classes exposed from this package. This class NOT thread-safe, not are its subclasses expected to be thread-safe.
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 public abstract class AbstractClientConnection<T extends BackendInfo> {
     private static final Logger LOG = LoggerFactory.getLogger(AbstractClientConnection.class);
 
@@ -198,7 +197,7 @@ public abstract class AbstractClientConnection<T extends BackendInfo> {
         }
     }
 
-    @GuardedBy("lock")
+    @Holding("lock")
     private void commonEnqueue(final ConnectionEntry entry, final long now) {
         final RequestException maybePoison = poisoned;
         if (maybePoison != null) {
@@ -223,7 +222,7 @@ public abstract class AbstractClientConnection<T extends BackendInfo> {
         return queue.drain();
     }
 
-    @GuardedBy("lock")
+    @Holding("lock")
     final void finishReplay(final ReconnectForwarder forwarder) {
         setForwarder(forwarder);
 
@@ -243,12 +242,12 @@ public abstract class AbstractClientConnection<T extends BackendInfo> {
         lock.unlock();
     }
 
-    @GuardedBy("lock")
+    @Holding("lock")
     final void setForwarder(final ReconnectForwarder forwarder) {
         queue.setForwarder(forwarder, currentTime());
     }
 
-    @GuardedBy("lock")
+    @Holding("lock")
     abstract ClientActorBehavior<T> lockedReconnect(ClientActorBehavior<T> current,
             RequestException runtimeRequestException);
 
@@ -287,7 +286,7 @@ public abstract class AbstractClientConnection<T extends BackendInfo> {
      *
      * @param delay Delay, in nanoseconds
      */
-    @GuardedBy("lock")
+    @Holding("lock")
     private void scheduleTimer(final long delay) {
         if (haveTimer) {
             LOG.debug("{}: timer already scheduled on {}", context.persistenceId(), this);
@@ -444,7 +443,7 @@ public abstract class AbstractClientConnection<T extends BackendInfo> {
         }
     }
 
-    @GuardedBy("lock")
+    @Holding("lock")
     private void lockedPoison(final RequestException cause) {
         poisoned = enrichPoison(cause);
         queue.poison(cause);
index 919aaf8..965fad1 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.controller.cluster.access.client;
 
 import java.util.concurrent.TimeUnit;
-import javax.annotation.concurrent.NotThreadSafe;
 
 /**
  * A ProgressTracker subclass which uses {@code ticksWorkedPerClosedTask} to compute delays.
@@ -24,9 +23,11 @@ import javax.annotation.concurrent.NotThreadSafe;
  * <p>On the other hand, there is no delay when number of open tasks is half the limit or less,
  * in order to prevent backend from running out of tasks while there may be waiting frontend threads.
  *
+ * <p>
+ * This class is NOT thread-safe.
+ *
  * @author Vratko Polak
  */
-@NotThreadSafe
 final class AveragingProgressTracker extends ProgressTracker {
     private static final long DEFAULT_TICKS_PER_TASK = TimeUnit.MILLISECONDS.toNanos(500);
 
index 53c6bd9..14ca1ef 100644 (file)
@@ -18,7 +18,7 @@ import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.commands.NotLeaderException;
@@ -301,7 +301,7 @@ public abstract class ClientActorBehavior<T extends BackendInfo> extends
      * @param newConn New connection
      * @return ConnectionConnectCohort which will be used to complete the process of bringing the connection up.
      */
-    @GuardedBy("connectionsLock")
+    @Holding("connectionsLock")
     protected abstract @NonNull ConnectionConnectCohort connectionUp(@NonNull ConnectedClientConnection<T> newConn);
 
     private void backendConnectFinished(final Long shard, final AbstractClientConnection<T> oldConn,
index f85e8e2..0864da1 100644 (file)
@@ -16,7 +16,6 @@ import akka.actor.Scheduler;
 import com.google.common.annotations.Beta;
 import com.google.common.base.Ticker;
 import java.util.concurrent.TimeUnit;
-import javax.annotation.concurrent.ThreadSafe;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.common.actor.Dispatchers;
@@ -32,12 +31,11 @@ import scala.concurrent.duration.FiniteDuration;
  * <p>
  * Time-keeping in a client actor is based on monotonic time. The precision of this time can be expected to be the
  * same as {@link System#nanoTime()}, but it is not tied to that particular clock. Actor clock is exposed as
- * a {@link Ticker}, which can be obtained via {@link #ticker()}.
+ * a {@link Ticker}, which can be obtained via {@link #ticker()}. This class is thread-safe.
  *
  * @author Robert Varga
  */
 @Beta
-@ThreadSafe
 public class ClientActorContext extends AbstractClientActorContext implements Identifiable<ClientIdentifier> {
     private final ExecutionContext executionContext;
     private final ClientIdentifier identifier;
index c540142..8a5af45 100644 (file)
@@ -8,11 +8,9 @@
 package org.opendaylight.controller.cluster.access.client;
 
 import com.google.common.annotations.Beta;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.concepts.RequestException;
 
 @Beta
-@NotThreadSafe
 public final class ConnectedClientConnection<T extends BackendInfo> extends AbstractReceivingClientConnection<T> {
 
     ConnectedClientConnection(final AbstractClientConnection<T> oldConnection, final T newBackend) {
index b4fb326..fed9d4c 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.controller.cluster.access.client;
 
 import com.google.common.base.Preconditions;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -50,7 +49,6 @@ import org.slf4j.LoggerFactory;
  * @author Vratko Polak
  */
 // TODO: Would bulk methods be less taxing than a loop of single task calls?
-@NotThreadSafe
 abstract class ProgressTracker {
     private static final Logger LOG = LoggerFactory.getLogger(ProgressTracker.class);
 
index 0313a72..be14d05 100644 (file)
@@ -18,7 +18,6 @@ import java.util.Deque;
 import java.util.Iterator;
 import java.util.Optional;
 import java.util.Queue;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.concepts.Request;
 import org.opendaylight.controller.cluster.access.concepts.RequestEnvelope;
 import org.opendaylight.controller.cluster.access.concepts.RequestException;
@@ -55,7 +54,6 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 abstract class TransmitQueue {
     static final class Halted extends TransmitQueue {
         // For ConnectingClientConnection.
@@ -79,7 +77,7 @@ abstract class TransmitQueue {
         }
 
         @Override
-        void preComplete(ResponseEnvelope<?> envelope) {
+        void preComplete(final ResponseEnvelope<?> envelope) {
         }
     }
 
@@ -135,7 +133,7 @@ abstract class TransmitQueue {
         }
 
         @Override
-        void preComplete(ResponseEnvelope<?> envelope) {
+        void preComplete(final ResponseEnvelope<?> envelope) {
             if (envelope.getTxSequence() == currentSlicedEnvSequenceId) {
                 // Slicing completed for the prior request - clear the cached sequence id field to enable subsequent
                 // requests to be transmitted.
index 51aaca2..972cab3 100644 (file)
@@ -14,7 +14,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index ce51fc9..c1b55ed 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
   <modelVersion>4.0.0</modelVersion>
index 12f99b1..fcffcff 100644 (file)
@@ -13,7 +13,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>bundle-parent</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 7f99824..13cf149 100644 (file)
@@ -20,14 +20,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentSkipListSet;
-import javax.annotation.concurrent.ThreadSafe;
 
 /**
- * Registry of {@link CloseTracked} instances.
+ * Registry of {@link CloseTracked} instances. This class is thread-safe.
  *
  * @author Michael Vorburger.ch
  */
-@ThreadSafe
 public class CloseTrackedRegistry<T extends CloseTracked<T>> {
 
     private final Object anchor;
index 652f7a0..c4de97a 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index a71bac9..2ba3e8f 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
index 85cd30a..6b91fdd 100644 (file)
@@ -12,7 +12,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index f27ef1a..b8f172b 100644 (file)
@@ -11,7 +11,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 7e07837..e5bbfa7 100644 (file)
@@ -5,7 +5,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index f79e789..0fe38b3 100644 (file)
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 65cef56..d8f2eaa 100644 (file)
@@ -20,7 +20,6 @@ import com.google.common.base.Ticker;
 import com.google.common.collect.ImmutableList;
 import java.util.LinkedList;
 import java.util.List;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -53,9 +52,11 @@ import org.slf4j.LoggerFactory;
  *     }
  *
  * </pre>
+ *
+ * <p>
+ * This class is NOT thread-safe.
  */
 @Beta
-@NotThreadSafe
 public final class MessageTracker {
     public abstract static class Context implements AutoCloseable {
         Context() {
index ff20c0f..74b55cf 100644 (file)
@@ -13,7 +13,6 @@ import static com.google.common.base.Verify.verifyNotNull;
 
 import com.google.common.annotations.Beta;
 import java.util.Optional;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
@@ -21,12 +20,11 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification
 
 /**
  * Abstract {@link DataTreeModificationCursor} which tracks the current path. Subclasses can get the current path
- * via {@link #current()}.
+ * via {@link #current()}. This class is NOT thread-safe.
  *
  * @author Thomas Pantelis
  */
 @Beta
-@NotThreadSafe
 public abstract class AbstractDataTreeModificationCursor implements DataTreeModificationCursor {
     private YangInstanceIdentifier current = YangInstanceIdentifier.EMPTY;
 
index 353a251..970b06f 100644 (file)
@@ -22,8 +22,8 @@ import java.io.OutputStream;
 import java.nio.file.Files;
 import java.util.Iterator;
 import java.util.Set;
-import javax.annotation.concurrent.GuardedBy;
-import javax.annotation.concurrent.ThreadSafe;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.slf4j.Logger;
@@ -35,7 +35,6 @@ import org.slf4j.LoggerFactory;
  *
  * @author Thomas Pantelis
  */
-@ThreadSafe
 public class FileBackedOutputStream extends OutputStream {
     private static final Logger LOG = LoggerFactory.getLogger(FileBackedOutputStream.class);
 
@@ -77,7 +76,7 @@ public class FileBackedOutputStream extends OutputStream {
      * @param fileDirectory the directory in which to create the file if needed. If null, the default temp file
      *                      location is used.
      */
-    public FileBackedOutputStream(int fileThreshold, @Nullable String fileDirectory) {
+    public FileBackedOutputStream(final int fileThreshold, @Nullable final String fileDirectory) {
         this.fileThreshold = fileThreshold;
         this.fileDirectory = fileDirectory;
     }
@@ -118,19 +117,19 @@ public class FileBackedOutputStream extends OutputStream {
     @Override
     @SuppressFBWarnings(value = "VO_VOLATILE_INCREMENT", justification = "Findbugs erroneously complains that the "
         + "increment of count needs to be atomic even though it is inside a synchronized block.")
-    public synchronized void write(int value) throws IOException {
+    public synchronized void write(final int value) throws IOException {
         possiblySwitchToFile(1);
         out.write(value);
         count++;
     }
 
     @Override
-    public synchronized void write(byte[] bytes) throws IOException {
+    public synchronized void write(final byte[] bytes) throws IOException {
         write(bytes, 0, bytes.length);
     }
 
     @Override
-    public synchronized void write(byte[] bytes, int off, int len) throws IOException {
+    public synchronized void write(final byte[] bytes, final int off, final int len) throws IOException {
         possiblySwitchToFile(len);
         out.write(bytes, off, len);
         count += len;
@@ -180,7 +179,7 @@ public class FileBackedOutputStream extends OutputStream {
         }
     }
 
-    @GuardedBy("this")
+    @Holding("this")
     private void closeQuietly() {
         try {
             close();
@@ -192,8 +191,8 @@ public class FileBackedOutputStream extends OutputStream {
     /**
      * Checks if writing {@code len} bytes would go over threshold, and switches to file buffering if so.
      */
-    @GuardedBy("this")
-    private void possiblySwitchToFile(int len) throws IOException {
+    @Holding("this")
+    private void possiblySwitchToFile(final int len) throws IOException {
         if (out == null) {
             throw new IOException("Stream already closed");
         }
@@ -233,7 +232,7 @@ public class FileBackedOutputStream extends OutputStream {
         }
     }
 
-    private static void deleteFile(File file) {
+    private static void deleteFile(final File file) {
         if (!file.delete()) {
             LOG.warn("Could not delete temp file {}", file);
         }
@@ -258,7 +257,7 @@ public class FileBackedOutputStream extends OutputStream {
     private static class Cleanup extends FinalizablePhantomReference<FileBackedOutputStream> {
         private final File file;
 
-        Cleanup(FileBackedOutputStream referent, File file) {
+        Cleanup(final FileBackedOutputStream referent, final File file) {
             super(referent, REFERENCE_QUEUE);
             this.file = file;
 
index 16c73c7..842fdaf 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.io.ByteSource;
 import java.io.BufferedOutputStream;
 import java.io.IOException;
 import java.util.Arrays;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.io.FileBackedOutputStream;
 import org.opendaylight.controller.cluster.io.FileBackedOutputStreamFactory;
 import org.opendaylight.yangtools.concepts.Identifier;
@@ -20,11 +19,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Maintains the state of an assembled message.
+ * Maintains the state of an assembled message. This class is NOT thread-safe.
  *
  * @author Thomas Pantelis
  */
-@NotThreadSafe
 public class AssembledMessageState implements AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(AssembledMessageState.class);
 
index 8c3cb51..5be3fa4 100644 (file)
@@ -12,19 +12,17 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Arrays;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.io.FileBackedOutputStream;
 import org.opendaylight.yangtools.concepts.Identifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Maintains the state of a sliced message.
+ * Maintains the state of a sliced message. This class is NOT thread-safe.
  *
  * @author Thomas Pantelis
  * @see MessageSlicer
  */
-@NotThreadSafe
 public class SlicedMessageState<T> implements AutoCloseable {
     private static final Logger LOG = LoggerFactory.getLogger(SlicedMessageState.class);
 
@@ -153,7 +151,7 @@ public class SlicedMessageState<T> implements AutoCloseable {
      * @param index the slice index to test
      * @return true if the index is the last slice, false otherwise
      */
-    public boolean isLastSlice(int index) {
+    public boolean isLastSlice(final int index) {
         return totalSlices == index;
     }
 
index 52c413f..4eed842 100644 (file)
@@ -12,7 +12,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
 
index 19bd475..c10cbca 100644 (file)
 
   <dependencies>
     <!-- Java -->
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
index 6ae7e51..3893dbd 100644 (file)
@@ -7,12 +7,13 @@
  */
 package org.opendaylight.controller.cluster.databroker;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.WeakHashMap;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.controller.cluster.databroker.actors.dds.AbstractClientHandle;
 import org.opendaylight.controller.cluster.databroker.actors.dds.ClientLocalHistory;
@@ -40,7 +41,7 @@ final class ClientBackedTransactionChain implements DOMStoreTransactionChain {
     private final boolean debugAllocation;
 
     ClientBackedTransactionChain(final ClientLocalHistory history, final boolean debugAllocation) {
-        this.history = Preconditions.checkNotNull(history);
+        this.history = requireNonNull(history);
         this.debugAllocation = debugAllocation;
     }
 
index 542cc2d..4429230 100644 (file)
@@ -7,8 +7,11 @@
  */
 package org.opendaylight.controller.cluster.databroker.actors.dds;
 
-import com.google.common.base.Preconditions;
-import com.google.common.base.Verify;
+import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.base.Preconditions.checkState;
+import static com.google.common.base.Verify.verifyNotNull;
+import static java.util.Objects.requireNonNull;
+
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
@@ -16,7 +19,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLongFieldUpdater;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 import java.util.concurrent.locks.StampedLock;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.access.client.AbstractClientConnection;
 import org.opendaylight.controller.cluster.access.client.ConnectedClientConnection;
 import org.opendaylight.controller.cluster.access.client.ConnectionEntry;
@@ -69,9 +72,9 @@ public abstract class AbstractClientHistory extends LocalAbortable implements Id
     private volatile State state = State.IDLE;
 
     AbstractClientHistory(final AbstractDataStoreClientBehavior client, final LocalHistoryIdentifier identifier) {
-        this.client = Preconditions.checkNotNull(client);
-        this.identifier = Preconditions.checkNotNull(identifier);
-        Preconditions.checkArgument(identifier.getCookie() == 0);
+        this.client = requireNonNull(client);
+        this.identifier = requireNonNull(identifier);
+        checkArgument(identifier.getCookie() == 0);
     }
 
     final State state() {
@@ -80,14 +83,14 @@ public abstract class AbstractClientHistory extends LocalAbortable implements Id
 
     final void updateState(final State expected, final State next) {
         final boolean success = STATE_UPDATER.compareAndSet(this, expected, next);
-        Preconditions.checkState(success, "Race condition detected, state changed from %s to %s", expected, state);
+        checkState(success, "Race condition detected, state changed from %s to %s", expected, state);
         LOG.debug("Client history {} changed state from {} to {}", this, expected, next);
     }
 
     final synchronized void doClose() {
         final State local = state;
         if (local != State.CLOSED) {
-            Preconditions.checkState(local == State.IDLE, "Local history %s has an open transaction", this);
+            checkState(local == State.IDLE, "Local history %s has an open transaction", this);
             histories.values().forEach(ProxyHistory::close);
             updateState(local, State.CLOSED);
         }
@@ -243,8 +246,7 @@ public abstract class AbstractClientHistory extends LocalAbortable implements Id
         }
 
         final AbstractTransactionCommitCohort previous = readyTransactions.putIfAbsent(txId, cohort);
-        Preconditions.checkState(previous == null, "Duplicate cohort %s for transaction %s, already have %s",
-                cohort, txId, previous);
+        checkState(previous == null, "Duplicate cohort %s for transaction %s, already have %s", cohort, txId, previous);
 
         LOG.debug("Local history {} readied transaction {}", this, txId);
         return cohort;
@@ -299,7 +301,7 @@ public abstract class AbstractClientHistory extends LocalAbortable implements Id
             return null;
         }
 
-        final ProxyReconnectCohort proxy = Verify.verifyNotNull(oldProxy.startReconnect(newConn));
+        final ProxyReconnectCohort proxy = verifyNotNull(oldProxy.startReconnect(newConn));
         return new HistoryReconnectCohort() {
             @Override
             ProxyReconnectCohort getProxy() {
index e1919d1..0b9f2b1 100644 (file)
@@ -7,10 +7,13 @@
  */
 package org.opendaylight.controller.cluster.databroker.actors.dds;
 
+import static com.google.common.base.Preconditions.checkState;
+import static com.google.common.base.Verify.verify;
+import static com.google.common.base.Verify.verifyNotNull;
+import static java.util.Objects.requireNonNull;
+
 import akka.actor.ActorRef;
 import com.google.common.base.MoreObjects;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Verify;
 import com.google.common.collect.Iterables;
 import com.google.common.util.concurrent.FluentFuture;
 import com.google.common.util.concurrent.ListenableFuture;
@@ -23,8 +26,7 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.GuardedBy;
-import javax.annotation.concurrent.NotThreadSafe;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.client.ConnectionEntry;
@@ -67,9 +69,8 @@ import org.slf4j.LoggerFactory;
 abstract class AbstractProxyTransaction implements Identifiable<TransactionIdentifier> {
     /**
      * Marker object used instead of read-type of requests, which are satisfied only once. This has a lower footprint
-     * and allows compressing multiple requests into a single entry.
+     * and allows compressing multiple requests into a single entry. This class is not thread-safe.
      */
-    @NotThreadSafe
     private static final class IncrementSequence {
         private final long sequence;
         private long delta = 0;
@@ -99,7 +100,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         private final String string;
 
         State(final String string) {
-            this.string = Preconditions.checkNotNull(string);
+            this.string = requireNonNull(string);
         }
 
         @Override
@@ -147,26 +148,26 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         }
 
         State getPrevState() {
-            return Verify.verifyNotNull(prevState, "Attempted to access previous state, which was not set");
+            return verifyNotNull(prevState, "Attempted to access previous state, which was not set");
         }
 
         void setPrevState(final State prevState) {
-            Verify.verify(this.prevState == null, "Attempted to set previous state to %s when we already have %s",
-                    prevState, this.prevState);
-            this.prevState = Preconditions.checkNotNull(prevState);
+            verify(this.prevState == null, "Attempted to set previous state to %s when we already have %s", prevState,
+                    this.prevState);
+            this.prevState = requireNonNull(prevState);
             // We cannot have duplicate successor states, so this check is sufficient
             this.done = DONE.equals(prevState);
         }
 
         // To be called from safe contexts, where successor is known to be completed
         AbstractProxyTransaction getSuccessor() {
-            return Verify.verifyNotNull(successor);
+            return verifyNotNull(successor);
         }
 
         void setSuccessor(final AbstractProxyTransaction successor) {
-            Verify.verify(this.successor == null, "Attempted to set successor to %s when we already have %s",
-                    successor, this.successor);
-            this.successor = Preconditions.checkNotNull(successor);
+            verify(this.successor == null, "Attempted to set successor to %s when we already have %s", successor,
+                    this.successor);
+            this.successor = requireNonNull(successor);
         }
 
         boolean isDone() {
@@ -254,7 +255,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
     private volatile State state;
 
     AbstractProxyTransaction(final ProxyHistory parent, final boolean isDone) {
-        this.parent = Preconditions.checkNotNull(parent);
+        this.parent = requireNonNull(parent);
         if (isDone) {
             state = DONE;
             // DONE implies previous seal operation completed
@@ -332,7 +333,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
     final void seal() {
         // Transition user-visible state first
         final boolean success = markSealed();
-        Preconditions.checkState(success, "Proxy %s was already sealed", getIdentifier());
+        checkState(success, "Proxy %s was already sealed", getIdentifier());
 
         if (!sealAndSend(Optional.empty())) {
             sealSuccessor();
@@ -400,16 +401,16 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
     }
 
     private void checkNotSealed() {
-        Preconditions.checkState(sealed == 0, "Transaction %s has already been sealed", getIdentifier());
+        checkState(sealed == 0, "Transaction %s has already been sealed", getIdentifier());
     }
 
     private void checkSealed() {
-        Preconditions.checkState(sealed != 0, "Transaction %s has not been sealed yet", getIdentifier());
+        checkState(sealed != 0, "Transaction %s has not been sealed yet", getIdentifier());
     }
 
     private SuccessorState getSuccessorState() {
         final State local = state;
-        Verify.verify(local instanceof SuccessorState, "State %s has unexpected class", local);
+        verify(local instanceof SuccessorState, "State %s has unexpected class", local);
         return (SuccessorState) local;
     }
 
@@ -420,7 +421,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
     }
 
     final void recordSuccessfulRequest(final @NonNull TransactionRequest<?> req) {
-        successfulRequests.add(Verify.verifyNotNull(req));
+        successfulRequests.add(verifyNotNull(req));
     }
 
     final void recordFinishedRequest(final Response<?, ?> response) {
@@ -500,7 +501,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         synchronized (this) {
             if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) {
                 final SettableFuture<Boolean> ret = SettableFuture.create();
-                sendRequest(Verify.verifyNotNull(commitRequest(false)), t -> {
+                sendRequest(verifyNotNull(commitRequest(false)), t -> {
                     if (t instanceof TransactionCommitSuccess) {
                         ret.set(Boolean.TRUE);
                     } else if (t instanceof RequestFailure) {
@@ -536,7 +537,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         // Precludes startReconnect() from interfering with the fast path
         synchronized (this) {
             if (STATE_UPDATER.compareAndSet(this, SEALED, FLUSHED)) {
-                final TransactionRequest<?> req = Verify.verifyNotNull(commitRequest(true));
+                final TransactionRequest<?> req = verifyNotNull(commitRequest(true));
 
                 sendRequest(req, t -> {
                     if (t instanceof TransactionCanCommitSuccess) {
@@ -662,7 +663,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
         final State prevState = STATE_UPDATER.getAndSet(this, nextState);
 
         LOG.debug("Start reconnect of proxy {} previous state {}", this, prevState);
-        Verify.verify(!(prevState instanceof SuccessorState), "Proxy %s duplicate reconnect attempt after %s", this,
+        verify(!(prevState instanceof SuccessorState), "Proxy %s duplicate reconnect attempt after %s", this,
             prevState);
 
         // We have asserted a slow-path state, seal(), canCommit(), directCommit() are forced to slow paths, which will
@@ -695,7 +696,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
                     LOG.debug("Forwarding successful request {} to successor {}", obj, successor);
                     successor.doReplayRequest((TransactionRequest<?>) obj, resp -> { /*NOOP*/ }, now);
                 } else {
-                    Verify.verify(obj instanceof IncrementSequence);
+                    verify(obj instanceof IncrementSequence);
                     final IncrementSequence increment = (IncrementSequence) obj;
                     successor.doReplayRequest(new IncrementTransactionSequenceRequest(getIdentifier(),
                         increment.getSequence(), localActor(), isSnapshotOnly(),
@@ -714,7 +715,7 @@ abstract class AbstractProxyTransaction implements Identifiable<TransactionIdent
             final Request<?, ?> req = e.getRequest();
 
             if (getIdentifier().equals(req.getTarget())) {
-                Verify.verify(req instanceof TransactionRequest, "Unhandled request %s", req);
+                verify(req instanceof TransactionRequest, "Unhandled request %s", req);
                 LOG.debug("Replaying queued request {} to successor {}", req, successor);
                 successor.doReplayRequest((TransactionRequest<?>) req, e.getCallback(), e.getEnqueuedTicks());
                 it.remove();
index e32d1bf..ca784fe 100644 (file)
@@ -21,8 +21,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.GuardedBy;
-import javax.annotation.concurrent.ThreadSafe;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.ABIVersion;
@@ -49,9 +48,11 @@ import scala.compat.java8.FutureConverters;
  * shard is assigned a single cookie and this mapping is stored in a bidirectional map. Information about corresponding
  * shard leader is resolved via {@link ActorUtils}. The product of resolution is {@link ShardBackendInfo}.
  *
+ * <p>
+ * This class is thread-safe.
+ *
  * @author Robert Varga
  */
-@ThreadSafe
 abstract class AbstractShardBackendResolver extends BackendInfoResolver<ShardBackendInfo> {
     static final class ShardState {
         private final CompletionStage<ShardBackendInfo> stage;
index 6679725..143cc8b 100644 (file)
@@ -13,7 +13,6 @@ import com.google.common.base.Preconditions;
 import com.google.common.util.concurrent.FluentFuture;
 import java.util.Optional;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.commands.AbortLocalTransactionRequest;
@@ -41,7 +40,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * An {@link AbstractProxyTransaction} for dispatching a transaction towards a shard leader which is co-located with
- * the client instance.
+ * the client instance. This class is NOT thread-safe.
  *
  * <p>
  * It requires a {@link DataTreeSnapshot}, which is used to instantiated a new {@link DataTreeModification}. Operations
@@ -54,7 +53,6 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 abstract class LocalProxyTransaction extends AbstractProxyTransaction {
     private static final Logger LOG = LoggerFactory.getLogger(LocalProxyTransaction.class);
 
index ee5889d..f9de02d 100644 (file)
@@ -7,11 +7,12 @@
  */
 package org.opendaylight.controller.cluster.databroker.actors.dds;
 
-import com.google.common.base.Preconditions;
-import com.google.common.base.Verify;
+import static com.google.common.base.Preconditions.checkNotNull;
+import static com.google.common.base.Verify.verify;
+import static java.util.Objects.requireNonNull;
+
 import java.util.Optional;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.commands.CommitLocalTransactionRequest;
 import org.opendaylight.controller.cluster.access.commands.ModifyTransactionRequest;
 import org.opendaylight.controller.cluster.access.commands.PersistenceProtocol;
@@ -22,11 +23,10 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot;
 
 /**
- * A read-only specialization of {@link LocalProxyTransaction}.
+ * A read-only specialization of {@link LocalProxyTransaction}. This class is NOT thread-safe.
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 final class LocalReadOnlyProxyTransaction extends LocalProxyTransaction {
 
     private final DataTreeSnapshot snapshot;
@@ -34,7 +34,7 @@ final class LocalReadOnlyProxyTransaction extends LocalProxyTransaction {
     LocalReadOnlyProxyTransaction(final ProxyHistory parent, final TransactionIdentifier identifier,
         final DataTreeSnapshot snapshot) {
         super(parent, identifier, false);
-        this.snapshot = Preconditions.checkNotNull(snapshot);
+        this.snapshot = requireNonNull(snapshot);
     }
 
     LocalReadOnlyProxyTransaction(final ProxyHistory parent, final TransactionIdentifier identifier) {
@@ -50,7 +50,7 @@ final class LocalReadOnlyProxyTransaction extends LocalProxyTransaction {
 
     @Override
     DataTreeSnapshot readOnlyView() {
-        return Preconditions.checkNotNull(snapshot, "Transaction %s is DONE", getIdentifier());
+        return checkNotNull(snapshot, "Transaction %s is DONE", getIdentifier());
     }
 
     @Override
@@ -94,9 +94,9 @@ final class LocalReadOnlyProxyTransaction extends LocalProxyTransaction {
     }
 
     private static void commonModifyTransactionRequest(final ModifyTransactionRequest request) {
-        Verify.verify(request.getModifications().isEmpty());
+        verify(request.getModifications().isEmpty());
 
         final PersistenceProtocol protocol = request.getPersistenceProtocol().get();
-        Verify.verify(protocol == PersistenceProtocol.ABORT);
+        verify(protocol == PersistenceProtocol.ABORT);
     }
 }
index 4f0290e..c32297f 100644 (file)
@@ -13,7 +13,6 @@ import java.util.Optional;
 import java.util.function.BiConsumer;
 import java.util.function.Consumer;
 import java.util.function.Supplier;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.commands.AbortLocalTransactionRequest;
@@ -46,7 +45,7 @@ import org.slf4j.LoggerFactory;
 
 /**
  * An {@link AbstractProxyTransaction} for dispatching a transaction towards a shard leader which is co-located with
- * the client instance.
+ * the client instance. This class is NOT thread-safe.
  *
  * <p>
  * It requires a {@link DataTreeSnapshot}, which is used to instantiated a new {@link DataTreeModification}. Operations
@@ -59,7 +58,6 @@ import org.slf4j.LoggerFactory;
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 final class LocalReadWriteProxyTransaction extends LocalProxyTransaction {
     private static final Logger LOG = LoggerFactory.getLogger(LocalReadWriteProxyTransaction.class);
 
index d360508..74aca03 100644 (file)
@@ -20,8 +20,7 @@ import java.util.concurrent.CompletionStage;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.TimeUnit;
-import javax.annotation.concurrent.GuardedBy;
-import javax.annotation.concurrent.ThreadSafe;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.access.client.BackendInfoResolver;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.datastore.shardmanager.RegisterForShardAvailabilityChanges;
@@ -38,9 +37,11 @@ import scala.concurrent.Future;
  * shard is assigned a single cookie and this mapping is stored in a bidirectional map. Information about corresponding
  * shard leader is resolved via {@link ActorUtils}. The product of resolution is {@link ShardBackendInfo}.
  *
+ * <p>
+ * This class is thread-safe.
+ *
  * @author Robert Varga
  */
-@ThreadSafe
 final class ModuleShardBackendResolver extends AbstractShardBackendResolver {
     private static final Logger LOG = LoggerFactory.getLogger(ModuleShardBackendResolver.class);
 
index ad105c3..25e7222 100644 (file)
@@ -20,7 +20,8 @@ import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 import org.opendaylight.controller.cluster.access.client.AbstractClientConnection;
 import org.opendaylight.controller.cluster.access.client.ClientActorContext;
 import org.opendaylight.controller.cluster.access.client.ConnectedClientConnection;
@@ -216,7 +217,7 @@ abstract class ProxyHistory implements Identifiable<LocalHistoryIdentifier> {
             return identifier;
         }
 
-        @GuardedBy("lock")
+        @Holding("lock")
         @Override
         void replayRequests(final Collection<ConnectionEntry> previousEntries) {
             // First look for our Create message
@@ -491,12 +492,12 @@ abstract class ProxyHistory implements Identifiable<LocalHistoryIdentifier> {
         LOG.debug("Proxy {} purge completed with {}", this, response);
     }
 
-    @GuardedBy("lock")
+    @Holding("lock")
     void onTransactionAborted(final AbstractProxyTransaction tx) {
         // No-op for most implementations
     }
 
-    @GuardedBy("lock")
+    @Holding("lock")
     void onTransactionCompleted(final AbstractProxyTransaction tx) {
         // No-op for most implementations
     }
index fda7fc6..c23fc3f 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.base.MoreObjects.ToStringHelper;
 import com.google.common.base.Preconditions;
 import com.google.common.primitives.UnsignedLong;
 import java.util.Optional;
-import javax.annotation.concurrent.ThreadSafe;
 import org.opendaylight.controller.cluster.access.ABIVersion;
 import org.opendaylight.controller.cluster.access.client.BackendInfo;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
@@ -20,11 +19,10 @@ import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
 
 /**
  * Combined backend tracking. Aside from usual {@link BackendInfo}, this object also tracks the cookie assigned
- * to the shard. This assignment remains constant for as long as the client is not restarted.
+ * to the shard. This assignment remains constant for as long as the client is not restarted. This class is thread-safe.
  *
  * @author Robert Varga
  */
-@ThreadSafe
 final class ShardBackendInfo extends BackendInfo {
     private final Optional<DataTree> dataTree;
     private final UnsignedLong cookie;
index e086f08..012e068 100644 (file)
@@ -11,7 +11,6 @@ import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Objects.requireNonNull;
 
 import java.util.concurrent.CompletionStage;
-import javax.annotation.concurrent.ThreadSafe;
 import org.opendaylight.controller.cluster.access.client.BackendInfoResolver;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
@@ -21,11 +20,11 @@ import org.slf4j.LoggerFactory;
 /**
  * {@link BackendInfoResolver} implementation for static shard configuration based on ShardManager. Unlike the full
  * {@link ModuleShardBackendResolver}, this resolver is used in situations where the client corresponds exactly to one
- * backend shard, e.g. there is only one fixed cookie assigned and the operation path is not consulted at all.
+ * backend shard, e.g. there is only one fixed cookie assigned and the operation path is not consulted at all. This
+ * class is thread-safe.
  *
  * @author Robert Varga
  */
-@ThreadSafe
 final class SimpleShardBackendResolver extends AbstractShardBackendResolver {
     private static final Logger LOG = LoggerFactory.getLogger(SimpleShardBackendResolver.class);
 
index 01298df..f9fffea 100644 (file)
@@ -14,7 +14,8 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 
 /**
  * An {@link AbstractFuture} implementation which requires a certain number of votes before it completes. If all votes
@@ -73,7 +74,7 @@ class VotingFuture<T> extends AbstractFuture<T> {
         return votes == 0;
     }
 
-    @GuardedBy("failures")
+    @Holding("failures")
     private void resolveResult() {
         final Iterator<Throwable> it = failures.iterator();
         if (!it.hasNext()) {
index b4cdb81..3d1bebe 100644 (file)
@@ -11,7 +11,6 @@ import akka.actor.ActorContext;
 import akka.actor.ActorRef;
 import akka.actor.Props;
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.common.actor.Dispatchers;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 import org.slf4j.Logger;
@@ -19,11 +18,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Abstract base class for a ShardDataTreeNotificationPublisher that offloads the generation and publication
- * of data tree notifications to an actor.
+ * of data tree notifications to an actor. This class is NOT thread-safe.
  *
  * @author Thomas Pantelis
  */
-@NotThreadSafe
 abstract class AbstractShardDataTreeNotificationPublisherActorProxy implements ShardDataTreeNotificationPublisher {
     @SuppressFBWarnings("SLF4J_LOGGER_SHOULD_BE_PRIVATE")
     protected final Logger log = LoggerFactory.getLogger(getClass());
index cde7da2..9412d47 100644 (file)
@@ -9,18 +9,16 @@ package org.opendaylight.controller.cluster.datastore;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Preconditions;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.controller.cluster.datastore.persisted.AbortTransactionPayload;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot;
 
 /**
- * Abstract base for transactions running on SharrdDataTree.
+ * Abstract base for transactions running on SharrdDataTree. This class is NOT thread-safe.
  *
  * @param <T> Backing transaction type.
  */
-@NotThreadSafe
 abstract class AbstractShardDataTreeTransaction<T extends DataTreeSnapshot>
         implements Identifiable<TransactionIdentifier> {
     private final ShardDataTreeTransactionParent parent;
index adf8b1a..6ead7c6 100644 (file)
@@ -14,7 +14,7 @@ import akka.actor.ActorSelection;
 import akka.actor.PoisonPill;
 import akka.dispatch.OnComplete;
 import com.google.common.annotations.VisibleForTesting;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.datastore.exceptions.LocalShardNotFoundException;
 import org.opendaylight.controller.cluster.datastore.messages.CloseDataTreeNotificationListenerRegistration;
 import org.opendaylight.controller.cluster.datastore.messages.RegisterDataTreeChangeListener;
index 1dd0f28..2859671 100644 (file)
@@ -21,7 +21,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Executor;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeCandidate;
@@ -40,10 +39,9 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Registry of user commit cohorts, which is responsible for handling registration and calculation
- * of affected cohorts based on {@link DataTreeCandidate}.
+ * of affected cohorts based on {@link DataTreeCandidate}. This class is NOT thread-safe.
  *
  */
-@NotThreadSafe
 class DataTreeCohortActorRegistry extends AbstractRegistrationTree<ActorRef> {
 
     private static final Logger LOG = LoggerFactory.getLogger(DataTreeCohortActorRegistry.class);
index 45b0f76..0b6f143 100644 (file)
@@ -14,7 +14,7 @@ import akka.dispatch.OnComplete;
 import akka.pattern.Patterns;
 import akka.util.Timeout;
 import java.util.concurrent.TimeUnit;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.datastore.exceptions.LocalShardNotFoundException;
 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeCommitCohort;
index 579e096..93aee0d 100644 (file)
@@ -7,7 +7,8 @@
  */
 package org.opendaylight.controller.cluster.datastore;
 
-import com.google.common.base.Preconditions;
+import static com.google.common.base.Preconditions.checkArgument;
+
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.primitives.Primitives;
@@ -28,9 +29,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
-import javax.annotation.concurrent.GuardedBy;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.text.WordUtils;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.datastore.DatastoreContext.Builder;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
@@ -134,9 +135,9 @@ public class DatastoreContextIntrospector {
     @SuppressWarnings("checkstyle:IllegalCatch")
     private static void processDataStoreProperty(final String name, final Class<?> propertyType,
             final Method readMethod) {
-        Preconditions.checkArgument(BUILDER_SETTERS.containsKey(name), String.format(
+        checkArgument(BUILDER_SETTERS.containsKey(name),
                 "DataStoreProperties property \"%s\" does not have corresponding setter in DatastoreContext.Builder",
-                name));
+                name);
         try {
             processPropertyType(propertyType);
             DATA_STORE_PROP_INFO.put(name, new SimpleImmutableEntry<>(propertyType, readMethod));
index e17e3fa..7865fdf 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.controller.cluster.datastore;
 import com.google.common.base.Optional;
 import java.util.Collection;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
 import org.opendaylight.mdsal.dom.spi.AbstractDOMDataTreeChangeListenerRegistration;
 import org.opendaylight.mdsal.dom.spi.store.AbstractDOMStoreTreeChangePublisher;
@@ -22,11 +21,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Default implementation of ShardDataTreeChangeListenerPublisher that directly generates and publishes
- * notifications for DataTreeChangeListeners.
+ * notifications for DataTreeChangeListeners. This class is NOT thread-safe.
  *
  * @author Thomas Pantelis
  */
-@NotThreadSafe
 final class DefaultShardDataTreeChangeListenerPublisher extends AbstractDOMStoreTreeChangePublisher
         implements ShardDataTreeChangeListenerPublisher {
     private static final Logger LOG = LoggerFactory.getLogger(DefaultShardDataTreeChangeListenerPublisher.class);
index 02cfda3..ef26e94 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.controller.cluster.datastore;
 
 import akka.actor.ActorRef;
 import java.util.EventListener;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.datastore.messages.RegisterDataTreeChangeListener;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 
index 763b2e9..fbaf76f 100644 (file)
@@ -14,7 +14,6 @@ import com.google.common.base.MoreObjects;
 import com.google.common.collect.Collections2;
 import java.util.HashMap;
 import java.util.Map;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
@@ -27,7 +26,9 @@ import org.opendaylight.yangtools.concepts.Identifiable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@NotThreadSafe
+/**
+ * This class is NOT thread-safe.
+ */
 final class FrontendClientMetadataBuilder implements Builder<FrontendClientMetadata>, Identifiable<ClientIdentifier> {
     private static final Logger LOG = LoggerFactory.getLogger(FrontendClientMetadataBuilder.class);
 
index 9f74a8e..969accd 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.collect.Collections2;
 import com.google.common.collect.Maps;
 import java.util.HashMap;
 import java.util.Map;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.FrontendIdentifier;
@@ -26,11 +25,10 @@ import org.slf4j.LoggerFactory;
 /**
  * Frontend state as observed by a shard follower. This class is responsible for maintaining metadata state
  * so that this can be used to seed {@link LeaderFrontendState} with proper state so that the frontend/backend
- * conversation can continue where it left off.
+ * conversation can continue where it left off. This class is NOT thread-safe.
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 final class FrontendMetadata extends ShardDataTreeMetadata<FrontendShardDataTreeSnapshotMetadata> {
     private static final Logger LOG = LoggerFactory.getLogger(FrontendMetadata.class);
 
index 16e956f..512e9f4 100644 (file)
@@ -11,7 +11,6 @@ import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Objects.requireNonNull;
 
 import java.util.Optional;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.commands.ExistsTransactionRequest;
 import org.opendaylight.controller.cluster.access.commands.ExistsTransactionSuccess;
 import org.opendaylight.controller.cluster.access.commands.ModifyTransactionRequest;
@@ -29,11 +28,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Read-only frontend transaction state as observed by the shard leader.
+ * Read-only frontend transaction state as observed by the shard leader. This class is NOT thread-safe.
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 final class FrontendReadOnlyTransaction extends FrontendTransaction {
     private static final Logger LOG = LoggerFactory.getLogger(FrontendReadOnlyTransaction.class);
 
index f24d0ee..777490b 100644 (file)
@@ -14,7 +14,6 @@ import com.google.common.primitives.UnsignedLong;
 import com.google.common.util.concurrent.FutureCallback;
 import java.util.Collection;
 import java.util.Optional;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.commands.AbortLocalTransactionRequest;
 import org.opendaylight.controller.cluster.access.commands.CommitLocalTransactionRequest;
@@ -50,11 +49,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Frontend read-write transaction state as observed by the shard leader.
+ * Frontend read-write transaction state as observed by the shard leader. This class is NOT thread-safe.
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 final class FrontendReadWriteTransaction extends FrontendTransaction {
     private enum CommitStage {
         READY,
index b5cd587..6bfd280 100644 (file)
@@ -13,7 +13,6 @@ import com.google.common.base.Verify;
 import java.util.ArrayDeque;
 import java.util.Optional;
 import java.util.Queue;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.commands.IncrementTransactionSequenceRequest;
 import org.opendaylight.controller.cluster.access.commands.IncrementTransactionSequenceSuccess;
@@ -29,11 +28,10 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Frontend common transaction state as observed by the shard leader.
+ * Frontend common transaction state as observed by the shard leader. This class is NOT thread-safe.
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 abstract class FrontendTransaction implements Identifiable<TransactionIdentifier> {
     private static final Logger LOG = LoggerFactory.getLogger(FrontendTransaction.class);
 
index 3628efb..2a1537b 100644 (file)
@@ -13,7 +13,6 @@ import com.google.common.base.MoreObjects;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.commands.CreateLocalHistoryRequest;
 import org.opendaylight.controller.cluster.access.commands.DeadHistoryException;
@@ -38,11 +37,10 @@ import org.slf4j.LoggerFactory;
 
 /**
  * Frontend state as observed by the shard leader. This class is responsible for tracking generations and sequencing
- * in the frontend/backend conversation.
+ * in the frontend/backend conversation. This class is NOT thread-safe.
  *
  * @author Robert Varga
  */
-@NotThreadSafe
 final class LeaderFrontendState implements Identifiable<ClientIdentifier> {
     private static final Logger LOG = LoggerFactory.getLogger(LeaderFrontendState.class);
 
index 5ca0acb..d22e028 100644 (file)
@@ -40,7 +40,6 @@ import java.util.concurrent.TimeoutException;
 import java.util.function.Consumer;
 import java.util.function.Function;
 import java.util.function.UnaryOperator;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
@@ -87,14 +86,12 @@ import org.slf4j.LoggerFactory;
 import scala.concurrent.duration.FiniteDuration;
 
 /**
- * Internal shard state, similar to a DOMStore, but optimized for use in the actor system,
- * e.g. it does not expose public interfaces and assumes it is only ever called from a
- * single thread.
+ * Internal shard state, similar to a DOMStore, but optimized for use in the actor system, e.g. it does not expose
+ * public interfaces and assumes it is only ever called from a single thread.
  *
  * <p>
- * This class is not part of the API contract and is subject to change at any time.
+ * This class is not part of the API contract and is subject to change at any time. It is NOT thread-safe.
  */
-@NotThreadSafe
 public class ShardDataTree extends ShardDataTreeTransactionParent {
     private static final class CommitEntry {
         final SimpleShardDataTreeCohort cohort;
index f439758..ed4d1f8 100644 (file)
@@ -12,19 +12,17 @@ import akka.actor.ActorRef;
 import akka.actor.Props;
 import com.google.common.base.Optional;
 import java.util.function.Consumer;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
 import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
 
 /**
- * Implementation of ShardDataTreeChangeListenerPublisher that offloads the generation and publication
- * of data tree change notifications to an actor.
+ * Implementation of ShardDataTreeChangeListenerPublisher that offloads the generation and publication of data tree
+ * change notifications to an actor. This class is NOT thread-safe.
  *
  * @author Thomas Pantelis
  */
-@NotThreadSafe
 class ShardDataTreeChangeListenerPublisherActorProxy extends AbstractShardDataTreeNotificationPublisherActorProxy
         implements ShardDataTreeChangeListenerPublisher {
 
index a774d64..9406eab 100644 (file)
@@ -11,7 +11,6 @@ import com.google.common.base.MoreObjects;
 import com.google.common.base.Preconditions;
 import java.util.Optional;
 import java.util.SortedSet;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.yangtools.concepts.Identifiable;
@@ -21,9 +20,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * A transaction chain attached to a Shard.
+ * A transaction chain attached to a Shard. This class is NOT thread-safe.
  */
-@NotThreadSafe
 final class ShardDataTreeTransactionChain extends ShardDataTreeTransactionParent
         implements Identifiable<LocalHistoryIdentifier> {
 
index 60628b0..2facfbd 100644 (file)
@@ -20,7 +20,7 @@ import java.util.Map.Entry;
 import java.util.Optional;
 import java.util.SortedSet;
 import java.util.concurrent.TimeUnit;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier;
 import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
 import org.slf4j.Logger;
index ee786e7..0c4a646 100644 (file)
@@ -19,8 +19,8 @@ import java.util.Map;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 import java.util.stream.Collectors;
-import javax.annotation.concurrent.GuardedBy;
-import javax.annotation.concurrent.ThreadSafe;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 import org.opendaylight.mdsal.eos.common.api.EntityOwnershipChangeState;
 import org.opendaylight.mdsal.eos.dom.api.DOMEntity;
 import org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipChange;
@@ -29,11 +29,11 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Manages EntityOwnershipListener registrations and notifications for the EntityOwnershipShard.
+ * Manages EntityOwnershipListener registrations and notifications for the EntityOwnershipShard. This class is
+ * thread-safe.
  *
  * @author Thomas Pantelis
  */
-@ThreadSafe
 class EntityOwnershipListenerSupport extends EntityOwnershipChangePublisher {
     private static final Logger LOG = LoggerFactory.getLogger(EntityOwnershipListenerSupport.class);
 
@@ -140,7 +140,7 @@ class EntityOwnershipListenerSupport extends EntityOwnershipChangePublisher {
         }
     }
 
-    @GuardedBy("listenerLock")
+    @Holding("listenerLock")
     private void notifyListeners(final DOMEntity entity, final boolean wasOwner, final boolean isOwner,
             final boolean hasOwner, final Collection<ListenerActorRefEntry> listenerEntries) {
         DOMEntityOwnershipChange changed = new DOMEntityOwnershipChange(entity,
index b323476..7f81370 100644 (file)
@@ -14,7 +14,7 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.List;
 import java.util.concurrent.atomic.AtomicLong;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.datastore.Shard;
 import org.opendaylight.controller.cluster.raft.base.messages.InitiateCaptureSnapshot;
index 0b3b6b8..679d421 100644 (file)
@@ -7,10 +7,11 @@
  */
 package org.opendaylight.controller.cluster.datastore.messages;
 
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
 import java.util.Optional;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.controller.cluster.notifications.LeaderStateChanged;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
 
@@ -25,20 +26,19 @@ public class ShardLeaderStateChanged extends LeaderStateChanged {
 
     private final DataTree localShardDataTree;
 
-    public ShardLeaderStateChanged(@Nonnull String memberId, @Nullable String leaderId,
-            @Nonnull DataTree localShardDataTree, short leaderPayloadVersion) {
+    public ShardLeaderStateChanged(@NonNull String memberId, @Nullable String leaderId,
+            @NonNull DataTree localShardDataTree, short leaderPayloadVersion) {
         super(memberId, leaderId, leaderPayloadVersion);
-        this.localShardDataTree = Preconditions.checkNotNull(localShardDataTree);
+        this.localShardDataTree = requireNonNull(localShardDataTree);
     }
 
-    public ShardLeaderStateChanged(@Nonnull String memberId, @Nullable String leaderId,
+    public ShardLeaderStateChanged(@NonNull String memberId, @Nullable String leaderId,
             short leaderPayloadVersion) {
         super(memberId, leaderId, leaderPayloadVersion);
         this.localShardDataTree = null;
     }
 
-    @Nonnull
-    public Optional<DataTree> getLocalShardDataTree() {
+    public @NonNull Optional<DataTree> getLocalShardDataTree() {
         return Optional.ofNullable(localShardDataTree);
     }
 }
index 504ac10..0e7216f 100644 (file)
@@ -20,7 +20,7 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.databroker.actors.dds.DataStoreClient;
 import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
index 21725d2..6d41cd6 100644 (file)
@@ -15,7 +15,7 @@ import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.databroker.actors.dds.DataStoreClient;
 import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
index 157ee88..b9019f0 100644 (file)
@@ -45,7 +45,7 @@ import java.util.concurrent.CompletionStage;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
 import org.opendaylight.controller.cluster.ActorSystemProvider;
 import org.opendaylight.controller.cluster.access.concepts.MemberName;
 import org.opendaylight.controller.cluster.databroker.actors.dds.DataStoreClient;
index 87f7ed1..ad4215c 100644 (file)
@@ -11,14 +11,12 @@ import static akka.actor.ActorRef.noSender;
 
 import akka.actor.ActorRef;
 import akka.actor.Status;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.eclipse.jdt.annotation.Nullable;
 
 /**
- * Base class for lookup tasks. Lookup tasks are supposed to run repeatedly
- * until successful lookup or maximum retries are hit.
+ * Base class for lookup tasks. Lookup tasks are supposed to run repeatedly until successful lookup or maximum retries
+ * are hit. This class is NOT thread-safe.
  */
-@NotThreadSafe
 abstract class LookupTask implements Runnable {
     private final int maxRetries;
     private final ActorRef replyTo;
index a4c653f..158c228 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.controller.cluster.databroker.actors.dds;
 
-import static org.hamcrest.CoreMatchers.both;
+import static org.hamcrest.CoreMatchers.allOf;
 import static org.hamcrest.CoreMatchers.hasItem;
 import static org.hamcrest.core.Is.isA;
 import static org.mockito.Mockito.mock;
@@ -222,9 +222,9 @@ public abstract class AbstractProxyTransactionTest<T extends AbstractProxyTransa
     protected void checkModifications(final ModifyTransactionRequest modifyRequest) {
         final List<TransactionModification> modifications = modifyRequest.getModifications();
         Assert.assertEquals(3, modifications.size());
-        Assert.assertThat(modifications, hasItem(both(isA(TransactionWrite.class)).and(hasPath(PATH_1))));
-        Assert.assertThat(modifications, hasItem(both(isA(TransactionMerge.class)).and(hasPath(PATH_2))));
-        Assert.assertThat(modifications, hasItem(both(isA(TransactionDelete.class)).and(hasPath(PATH_3))));
+        Assert.assertThat(modifications, hasItem(allOf(isA(TransactionWrite.class), hasPath(PATH_1))));
+        Assert.assertThat(modifications, hasItem(allOf(isA(TransactionMerge.class), hasPath(PATH_2))));
+        Assert.assertThat(modifications, hasItem(allOf(isA(TransactionDelete.class), hasPath(PATH_3))));
     }
 
     @SuppressWarnings("checkstyle:hiddenField")
index af474c5..0e96e81 100644 (file)
@@ -20,7 +20,8 @@ import java.util.AbstractMap.SimpleImmutableEntry;
 import java.util.Map.Entry;
 import java.util.concurrent.CancellationException;
 import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
-import javax.annotation.concurrent.GuardedBy;
+import org.checkerframework.checker.lock.qual.GuardedBy;
+import org.checkerframework.checker.lock.qual.Holding;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
@@ -210,7 +211,7 @@ public final class PingPongTransactionChain implements DOMTransactionChain {
      * this method has completed executing. Also inflightTx may be updated outside
      * the lock, hence we need to re-check.
      */
-    @GuardedBy("this")
+    @Holding("this")
     private void processIfReady() {
         if (inflightTx == null) {
             final PingPongTransaction tx = READY_UPDATER.getAndSet(this, null);
@@ -226,7 +227,7 @@ public final class PingPongTransactionChain implements DOMTransactionChain {
      *
      * @param tx Transaction which needs processing.
      */
-    @GuardedBy("this")
+    @Holding("this")
     private void processTransaction(final @NonNull PingPongTransaction tx) {
         if (failed) {
             LOG.debug("Cancelling transaction {}", tx);
index fd8ed94..55a5448 100644 (file)
@@ -23,7 +23,6 @@ import com.google.common.util.concurrent.MoreExecutors;
 import com.google.common.util.concurrent.SettableFuture;
 import java.util.Map;
 import java.util.Queue;
-import javax.annotation.concurrent.NotThreadSafe;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
@@ -52,9 +51,9 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
  * subtree in conceptual data tree. We define this subtree by first write
  * operation performed on transaction. All next read and write operations
  * should be performed just in this initial subtree.
+ *
  */
 // FIXME explicitly enforce just one subtree requirement
-@NotThreadSafe
 class ShardedDOMDataBrokerDelegatingReadWriteTransaction implements DOMDataReadWriteTransaction {
     private final DOMDataReadOnlyTransaction readTxDelegate;
     private final DOMDataWriteTransaction writeTxDelegate;
index ee98da7..34e5df5 100644 (file)
@@ -13,7 +13,7 @@
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>4.0.9</version>
+        <version>5.0.0</version>
         <relativePath/>
     </parent>
 
diff --git a/pom.xml b/pom.xml
index 91d0428..0b70def 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>odlparent-lite</artifactId>
-    <version>4.0.9</version>
+    <version>5.0.0</version>
     <relativePath/>
   </parent>
   <groupId>org.opendaylight.controller</groupId>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.