Most of the annotations are not needed, as they are already
specified as JDT annotations in implemented interfaces. This
eliminates most annotations (where implied) and migrates them
in fresh uses.
Change-Id: I39af973b710d2c8aa6eac11d53e0ebc23a807533
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
<artifactId>mdsal-singleton-common-api</artifactId>
<version>4.0.2</version>
</dependency>
<artifactId>mdsal-singleton-common-api</artifactId>
<version>4.0.2</version>
</dependency>
- <dependency>
- <groupId>com.google.code.findbugs</groupId>
- <artifactId>jsr305</artifactId>
- <optional>true</optional>
- </dependency>
<!--Needed for testing-->
<dependency>
<!--Needed for testing-->
<dependency>
import com.google.common.base.Preconditions;
import java.util.Collection;
import com.google.common.base.Preconditions;
import java.util.Collection;
-import javax.annotation.Nonnull;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataObjectModification;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataObjectModification;
- public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<T>> changes) {
+ public void onDataTreeChanged(Collection<DataTreeModification<T>> changes) {
for (DataTreeModification<T> change : changes) {
DataObjectModification<T> mod = change.getRootNode();
for (DataTreeModification<T> change : changes) {
DataObjectModification<T> mod = change.getRootNode();
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
-import javax.annotation.Nonnull;
import org.checkerframework.checker.lock.qual.GuardedBy;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.checkerframework.checker.lock.qual.GuardedBy;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
- public synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<VbridgeTopology>> changes) {
+ public synchronized void onDataTreeChanged(Collection<DataTreeModification<VbridgeTopology>> changes) {
for (DataTreeModification<VbridgeTopology> topologyData : changes) {
final KeyedInstanceIdentifier<Topology, TopologyKey> topologyInstanceIdentifier =
(KeyedInstanceIdentifier<Topology, TopologyKey>) topologyData
for (DataTreeModification<VbridgeTopology> topologyData : changes) {
final KeyedInstanceIdentifier<Topology, TopologyKey> topologyInstanceIdentifier =
(KeyedInstanceIdentifier<Topology, TopologyKey>) topologyData
*/
package org.opendaylight.lispflowmapping.neutron.intenthandler.listener;
*/
package org.opendaylight.lispflowmapping.neutron.intenthandler.listener;
-import com.google.common.base.Function;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.util.concurrent.FutureCallback;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil;
import org.opendaylight.lispflowmapping.neutron.intenthandler.IntentHandlerAsyncExecutorProvider;
import org.opendaylight.lispflowmapping.neutron.intenthandler.util.VppNetconfConnectionProbe;
import org.opendaylight.lispflowmapping.lisp.util.LispAddressUtil;
import org.opendaylight.lispflowmapping.neutron.intenthandler.IntentHandlerAsyncExecutorProvider;
import org.opendaylight.lispflowmapping.neutron.intenthandler.util.VppNetconfConnectionProbe;
- public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Topology>> changes) {
+ public void onDataTreeChanged(Collection<DataTreeModification<Topology>> changes) {
for (DataTreeModification<Topology> change : changes) {
final DataObjectModification<Topology> modification = change.getRootNode();
ListenableFuture<Void> modificationTaskHandler;
for (DataTreeModification<Topology> change : changes) {
final DataObjectModification<Topology> modification = change.getRootNode();
ListenableFuture<Void> modificationTaskHandler;
}
Futures.addCallback(modificationTaskHandler, new FutureCallback<Void>() {
@Override
}
Futures.addCallback(modificationTaskHandler, new FutureCallback<Void>() {
@Override
- public void onSuccess(@Nullable Void vd) {
+ public void onSuccess(Void vd) {
LOG.debug("VppEndpoint modification handled successfully!");
}
LOG.debug("VppEndpoint modification handled successfully!");
}
ListenableFuture<KeyedInstanceIdentifier<Node, NodeKey>> processingTask = processNode(newOrModifiedNode);
Futures.addCallback(processingTask, new FutureCallback<KeyedInstanceIdentifier<Node, NodeKey>>() {
@Override
ListenableFuture<KeyedInstanceIdentifier<Node, NodeKey>> processingTask = processNode(newOrModifiedNode);
Futures.addCallback(processingTask, new FutureCallback<KeyedInstanceIdentifier<Node, NodeKey>>() {
@Override
- public void onSuccess(@Nullable KeyedInstanceIdentifier<Node, NodeKey> kiiToNode) {
+ public void onSuccess(KeyedInstanceIdentifier<Node, NodeKey> kiiToNode) {
hostInformationManager.addHostRelatedInfo(newOrModifiedNode.getNodeId().getValue(),
LispAddressUtil.toRloc(vppNodeReader.rlocIpOfNode(kiiToNode)));
}
hostInformationManager.addHostRelatedInfo(newOrModifiedNode.getNodeId().getValue(),
LispAddressUtil.toRloc(vppNodeReader.rlocIpOfNode(kiiToNode)));
}
});
return Futures.transform(probeVppNodeForConnection,
});
return Futures.transform(probeVppNodeForConnection,
- new Function<Void, KeyedInstanceIdentifier<Node, NodeKey>>() {
- @Nullable
- @Override
- public KeyedInstanceIdentifier<Node, NodeKey> apply(@Nullable Void vd) {
- return nodeIdToKeyedInstanceIdentifierMap.get(newOrModifiedNode.getNodeId()).iterator().next();
- }
- }, MoreExecutors.directExecutor());
+ vd -> nodeIdToKeyedInstanceIdentifierMap.get(newOrModifiedNode.getNodeId()).iterator().next(),
+ MoreExecutors.directExecutor());
}
private void processNodeOnConnection(final Node newOrModifiedNode) {
}
private void processNodeOnConnection(final Node newOrModifiedNode) {
*/
package org.opendaylight.lispflowmapping.neutron.intenthandler.listener.service;
*/
package org.opendaylight.lispflowmapping.neutron.intenthandler.listener.service;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.lispflowmapping.neutron.intenthandler.listener.VbridgeTopologyListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
import org.opendaylight.lispflowmapping.neutron.intenthandler.listener.VbridgeTopologyListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
- public static VbridgeTopologyListenerService initialize(@Nonnull final DataBroker dataBroker,
- @Nonnull final MountPointService mountPointService) {
+ public static VbridgeTopologyListenerService initialize(final @NonNull DataBroker dataBroker,
+ final @NonNull MountPointService mountPointService) {
final ListenerRegistration<VbridgeTopologyListener> reg =
dataBroker.registerDataTreeChangeListener(TREE_LISTENER_IDENTIFIER,
new VbridgeTopologyListener(dataBroker, mountPointService));
final ListenerRegistration<VbridgeTopologyListener> reg =
dataBroker.registerDataTreeChangeListener(TREE_LISTENER_IDENTIFIER,
new VbridgeTopologyListener(dataBroker, mountPointService));
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import javax.annotation.Nonnull;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataObjectModification;
import org.opendaylight.mdsal.binding.api.ClusteredDataTreeChangeListener;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.DataObjectModification;
- public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) {
+ public void onDataTreeChanged(Collection<DataTreeModification<Node>> changes) {
changes.forEach(modification -> {
final DataObjectModification<Node> rootNode = modification.getRootNode();
final Node node = rootNode.getDataAfter();
changes.forEach(modification -> {
final DataObjectModification<Node> rootNode = modification.getRootNode();
final Node node = rootNode.getDataAfter();