Migrate nullness annotations 30/106830/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Jul 2023 21:40:19 +0000 (23:40 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Jul 2023 21:40:19 +0000 (23:40 +0200)
Do not depend on javax.annotation, use JDT annotations instead.

Change-Id: Ie0e30b6ab0e1f7314f55aa40a0a667f6d7739ae7
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
15 files changed:
networkmodel/pom.xml
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/NetConfTopologyListener.java
olm/pom.xml
olm/src/test/java/org/opendaylight/transportpce/olm/stub/MountPointStub.java
tapi/pom.xml
tapi/src/main/java/org/opendaylight/transportpce/tapi/topology/TapiNetconfTopologyListener.java
test-common/pom.xml
test-common/src/main/java/org/opendaylight/transportpce/test/AbstractDeviceTest.java
test-common/src/main/java/org/opendaylight/transportpce/test/DeviceWrapper.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/AbstractDataObjectConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/DataObjectConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/JSONDataObjectConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/converter/XMLDataObjectConverter.java
test-common/src/main/java/org/opendaylight/transportpce/test/stub/MountPointStub.java
test-common/src/main/java/org/opendaylight/transportpce/test/utils/TopologyDataUtils.java

index 1be1105c749caaf69eebfd1a6edb128f7f5de926..e2547ed856118ed1b42c12b928390066c91722ad 100644 (file)
@@ -167,14 +167,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>org.osgi.service.component.annotations</artifactId>
     </dependency>
 
-    <!-- Sodium bump: javax.annotation.Nullable and friends -->
-    <dependency>
-      <groupId>com.google.code.findbugs</groupId>
-      <artifactId>jsr305</artifactId>
-      <version>3.0.2</version>
-      <optional>true</optional>
-    </dependency>
-
     <!-- Testing Dependencies -->
     <dependency>
       <groupId>${project.groupId}</groupId>
index fed4a093299b94a12ee03d4c77c7609daf0c37bf..6556a7eb8ab0cd28f11b2b4bac071b677f15bb1d 100644 (file)
@@ -16,7 +16,6 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ExecutionException;
-import javax.annotation.Nonnull;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
@@ -69,7 +68,8 @@ public class NetConfTopologyListener implements DataTreeChangeListener<Node> {
         this.portMapping = portMapping;
     }
 
-    public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) {
+    @Override
+    public void onDataTreeChanged(Collection<DataTreeModification<Node>> changes) {
         LOG.info("onDataTreeChanged - {}", this.getClass().getSimpleName());
         for (DataTreeModification<Node> change : changes) {
             DataObjectModification<Node> rootNode = change.getRootNode();
index 048bd36998bd6724f4ac95e31d370b7dee55cbee..bb7d8ef1864013aa6d8715e7577fafb5dee0f183 100644 (file)
@@ -135,13 +135,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <artifactId>mdsal-binding-generator</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>com.google.code.findbugs</groupId>
-      <artifactId>jsr305</artifactId>
-      <version>3.0.2</version>
-      <scope>test</scope>
-      <optional>true</optional>
-    </dependency>
   </dependencies>
 
   <build>
index 6ba508ed4abaca5ca9f2d4bff2f6faf6ab2f8db0..deda38d1e264a5897380c6118444c693a94f5f0c 100644 (file)
@@ -5,18 +5,16 @@
  * 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.transportpce.olm.stub;
 
 import java.util.Optional;
-import javax.annotation.Nonnull;
 import org.opendaylight.mdsal.binding.api.BindingService;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.MountPoint;
 import org.opendaylight.mdsal.binding.api.RpcConsumerRegistry;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 
-public class MountPointStub  implements MountPoint {
+public class MountPointStub implements MountPoint {
 
     private DataBroker dataBroker;
 
@@ -43,7 +41,6 @@ public class MountPointStub  implements MountPoint {
         return Optional.empty();
     }
 
-    @Nonnull
     @Override
     public InstanceIdentifier<?> getIdentifier() {
         return null;
index a33f47084765f3f988645fe38fccbcc3d766c6d8..6cf567c0630bb3ac6c0d88db464f10a6733d0588 100644 (file)
@@ -167,14 +167,6 @@ Author: Martial Coulibaly <martial.coulibaly@gfi.com> on behalf of Orange
       <artifactId>org.osgi.service.component.annotations</artifactId>
     </dependency>
 
-    <!-- Sodium bump: javax.annotation.Nullable and friends -->
-    <dependency>
-      <groupId>com.google.code.findbugs</groupId>
-      <artifactId>jsr305</artifactId>
-      <version>3.0.2</version>
-      <optional>true</optional>
-    </dependency>
-
     <!-- Testing Dependencies -->
     <dependency>
       <groupId>${project.groupId}</groupId>
index a7f1e29f14108f582b84890091abab99049ed35a..b1f33aa618b91e4cd9bc5d6742724307242dc315 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.transportpce.tapi.topology;
 
 import java.util.Collection;
 import java.util.Optional;
-import javax.annotation.Nonnull;
 import org.opendaylight.mdsal.binding.api.DataObjectModification;
 import org.opendaylight.mdsal.binding.api.DataTreeChangeListener;
 import org.opendaylight.mdsal.binding.api.DataTreeModification;
@@ -30,7 +29,8 @@ public class TapiNetconfTopologyListener implements DataTreeChangeListener<Node>
         this.tapiNetworkModelService = tapiNetworkModelService;
     }
 
-    public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) {
+    @Override
+    public void onDataTreeChanged(Collection<DataTreeModification<Node>> changes) {
         LOG.info("onDataTreeChanged - {}", this.getClass().getSimpleName());
         for (DataTreeModification<Node> change : changes) {
             DataObjectModification<Node> rootNode = change.getRootNode();
index 7aae445566faf7b7b24cfcca26a744fedbcea692..8d8db3cc7608988172c3e0c6c8855e9dfba164bb 100644 (file)
       <groupId>org.opendaylight.mdsal</groupId>
       <artifactId>mdsal-binding-runtime-spi</artifactId>
     </dependency>
-    <!-- Sodium bump: javax.annotation.Nullable and friends -->
-    <dependency>
-      <groupId>com.google.code.findbugs</groupId>
-      <artifactId>jsr305</artifactId>
-      <version>3.0.2</version>
-      <optional>true</optional>
-    </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>
       <artifactId>guava</artifactId>
index ccb2546c9c3c33d6bc0733174489228f27f2ade9..267ad301aa39b56072cee0ee661a30abb0d7da5f 100644 (file)
@@ -13,7 +13,7 @@ import java.io.InputStream;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -45,8 +45,8 @@ public abstract class AbstractDeviceTest {
      * @param intialDataQName {@link QName} of initial simulator data
      * @return device simulator (wrapper)
      */
-    public DeviceWrapper createDeviceWrapper(@Nonnull String key, @Nonnull InputStream initialDataXmlInputStream,
-            @Nonnull QName intialDataQName) {
+    public DeviceWrapper createDeviceWrapper(@NonNull String key, @NonNull InputStream initialDataXmlInputStream,
+            @NonNull QName intialDataQName) {
         DeviceWrapper deviceWrapper =
                 DeviceWrapper.createDeviceWrapper(key, initialDataXmlInputStream, intialDataQName);
         LOG.info("Creating a new device wrapper {}, {}", key, deviceWrapper);
@@ -60,7 +60,7 @@ public abstract class AbstractDeviceTest {
      * @param deviceIdentifier identifier of device simulator
      * @return stored device or null if not found
      */
-    public DeviceWrapper getDevice(@Nonnull String deviceIdentifier) {
+    public DeviceWrapper getDevice(@NonNull String deviceIdentifier) {
         Preconditions.checkArgument(!Strings.isNullOrEmpty(deviceIdentifier));
         return internalStorage.get(deviceIdentifier);
     }
index 5c94f6e03112bd4061473f0b09388bd15a5679f4..ebd1ec0da88c0b3445253540f725df75dfcafb8d 100644 (file)
@@ -18,7 +18,7 @@ import java.util.List;
 import java.util.Map.Entry;
 import java.util.Optional;
 import java.util.concurrent.ExecutionException;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.dom.api.DOMDataBroker;
@@ -91,8 +91,8 @@ public final class DeviceWrapper {
      * @param intialDataQName {@link QName} of initial data
      * @return device simulator
      */
-    public static DeviceWrapper createDeviceWrapper(@Nonnull String key, @Nonnull InputStream initialDataXmlInputStream,
-            @Nonnull QName intialDataQName) {
+    public static DeviceWrapper createDeviceWrapper(@NonNull String key, @NonNull InputStream initialDataXmlInputStream,
+            @NonNull QName intialDataQName) {
         requireNonNull(initialDataXmlInputStream, "Input stream cannot be null");
         requireNonNull(intialDataQName, "QName cannot be null");
         return createDeviceWrapper(key, Lists.newArrayList(
@@ -109,8 +109,8 @@ public final class DeviceWrapper {
      * @param initialData {@link List} of {@link Entry} values
      * @return created {@link DeviceWrapper} with all initial data provided by initial data
      */
-    public static DeviceWrapper createDeviceWrapper(@Nonnull String key,
-            @Nonnull List<Entry<QName, InputStream>> initialData) {
+    public static DeviceWrapper createDeviceWrapper(@NonNull String key,
+            @NonNull List<Entry<QName, InputStream>> initialData) {
         Preconditions.checkArgument(!Strings.isNullOrEmpty(key), "The provided key cannot be null or empty");
         Preconditions.checkArgument(initialData != null && !initialData.isEmpty(),
                 "Initial data cannot be null or empty");
index 389728d80cf5bbff3ee4bd65564048dbf2aade7d..3bd1fb38d01a70d85a313f0c00d773440fde180c 100644 (file)
@@ -10,7 +10,7 @@ package org.opendaylight.transportpce.test.converter;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Optional;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -72,8 +72,8 @@ public abstract class AbstractDataObjectConverter implements DataObjectConverter
     @Override
     @SuppressWarnings("unchecked")
     public <T extends DataObject> Optional<T> getDataObject(
-            @Nonnull NormalizedNode normalizedNode,
-            @Nonnull QName rootNode) {
+            @NonNull NormalizedNode normalizedNode,
+            @NonNull QName rootNode) {
         //Preconditions.checkNotNull(normalizedNode);
         if (normalizedNode instanceof ContainerNode) {
             YangInstanceIdentifier.PathArgument directChildIdentifier =
@@ -97,7 +97,7 @@ public abstract class AbstractDataObjectConverter implements DataObjectConverter
 
     @Override
     @SuppressWarnings("unchecked")
-    public <T extends DataObject> Optional<T> getDataObjectFromRpc(@Nonnull NormalizedNode normalizedNode) {
+    public <T extends DataObject> Optional<T> getDataObjectFromRpc(@NonNull NormalizedNode normalizedNode) {
 
         if (! (normalizedNode instanceof ContainerNode)) {
             LOG.error("converting normalized node is not ContainerNode. It's actual type is {}",
@@ -111,7 +111,7 @@ public abstract class AbstractDataObjectConverter implements DataObjectConverter
 
     @Override
     @SuppressWarnings({"rawtypes","unchecked"})
-    public <T extends DataObject> Optional<NormalizedNode> toNormalizedNodes(@Nonnull T object,
+    public <T extends DataObject> Optional<NormalizedNode> toNormalizedNodes(@NonNull T object,
             Class dataObjectClass) {
         Entry<YangInstanceIdentifier, NormalizedNode> normalizedNode =
                 codecRegistry.toNormalizedNode(InstanceIdentifier.create(dataObjectClass), object);
index d8614ffa7534dd90ffa30201b7d4f3e223cd05ff..0e87da06fbee720f1ddf49187a3db5872cf67f34 100644 (file)
@@ -11,7 +11,7 @@ import java.io.InputStream;
 import java.io.Reader;
 import java.io.Writer;
 import java.util.Optional;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.Notification;
@@ -22,29 +22,29 @@ import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 public interface DataObjectConverter {
 
     <T extends DataObject> Optional<T> getDataObject(
-            @Nonnull NormalizedNode normalizedNode,
-            @Nonnull QName rootNode);
+            @NonNull NormalizedNode normalizedNode,
+            @NonNull QName rootNode);
 
     <T extends DataObject> Optional<T> getDataObjectFromRpc(
-            @Nonnull NormalizedNode normalizedNode);
+            @NonNull NormalizedNode normalizedNode);
 
     Optional<NormalizedNode> transformIntoNormalizedNode(
-            @Nonnull InputStream inputStream);
+            @NonNull InputStream inputStream);
 
     Optional<NormalizedNode> transformIntoNormalizedNode(
-            @Nonnull Reader inputReader, SchemaNode parentSchema);
+            @NonNull Reader inputReader, SchemaNode parentSchema);
 
     Optional<NormalizedNode> transformIntoNormalizedNode(
-            @Nonnull Reader inputReader);
+            @NonNull Reader inputReader);
 
-    <T extends DataObject> Writer writerFromDataObject(@Nonnull DataObject object, Class<T> dataObjectClass,
+    <T extends DataObject> Writer writerFromDataObject(@NonNull DataObject object, Class<T> dataObjectClass,
             ConvertType<T> convertType);
 
-    <T extends DataObject> Writer writerFromRpcDataObject(@Nonnull DataObject object, Class<T> dataObjectClass,
+    <T extends DataObject> Writer writerFromRpcDataObject(@NonNull DataObject object, Class<T> dataObjectClass,
             ConvertType<T> convertType, QName rpcOutputQName, String rpcName);
 
     @SuppressWarnings("rawtypes")
-    <T extends DataObject> Optional<NormalizedNode> toNormalizedNodes(@Nonnull T object, Class dataObjectClass);
+    <T extends DataObject> Optional<NormalizedNode> toNormalizedNodes(@NonNull T object, Class dataObjectClass);
 
     interface ConvertType<T> {
         Optional<NormalizedNode> toNormalizedNodes(T object, Class<T> clazz);
index fbb31f694fbfe4e36143c44c202cf78e7151e447..ba951d7563a8f880a4785e256cdec28fc7ae3c5a 100644 (file)
@@ -17,7 +17,7 @@ import java.io.StringWriter;
 import java.io.Writer;
 import java.nio.charset.StandardCharsets;
 import java.util.Optional;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.transportpce.test.DataStoreContext;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -53,7 +53,7 @@ public final class JSONDataObjectConverter extends AbstractDataObjectConverter {
      * @param dataStoreContextUtil datastore context util used to extract codec and schema context
      * @return {@link AbstractDataObjectConverter}
      */
-    public static DataObjectConverter createWithDataStoreUtil(@Nonnull DataStoreContext dataStoreContextUtil) {
+    public static DataObjectConverter createWithDataStoreUtil(@NonNull DataStoreContext dataStoreContextUtil) {
         return new JSONDataObjectConverter(dataStoreContextUtil.getSchemaContext(),
                 dataStoreContextUtil.getBindingDOMCodecServices());
     }
@@ -65,8 +65,8 @@ public final class JSONDataObjectConverter extends AbstractDataObjectConverter {
      * @param codecRegistry codec registry used for converting
      * @return converter
      */
-    public static DataObjectConverter createWithSchemaContext(@Nonnull EffectiveModelContext schemaContext,
-            @Nonnull BindingNormalizedNodeSerializer codecRegistry) {
+    public static DataObjectConverter createWithSchemaContext(@NonNull EffectiveModelContext schemaContext,
+            @NonNull BindingNormalizedNodeSerializer codecRegistry) {
         return new JSONDataObjectConverter(schemaContext, codecRegistry);
     }
 
@@ -78,26 +78,26 @@ public final class JSONDataObjectConverter extends AbstractDataObjectConverter {
      */
     @Override
     public Optional<NormalizedNode> transformIntoNormalizedNode(
-            @Nonnull InputStream inputStream) {
+        @   NonNull InputStream inputStream) {
         JsonReader reader = new JsonReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
         return parseInputJSON(reader);
     }
 
     @Override
     public Optional<NormalizedNode> transformIntoNormalizedNode(
-            @Nonnull Reader inputReader, SchemaNode parentSchema) {
+            @NonNull Reader inputReader, SchemaNode parentSchema) {
         throw new UnsupportedOperationException("Not Implemented yet");
     }
 
     @Override
     public Optional<NormalizedNode> transformIntoNormalizedNode(
-            @Nonnull Reader inputReader) {
+            @NonNull Reader inputReader) {
         JsonReader reader = new JsonReader(inputReader);
         return parseInputJSON(reader);
     }
 
     @Override
-    public <T extends DataObject> Writer writerFromDataObject(@Nonnull DataObject object, Class<T> dataObjectClass,
+    public <T extends DataObject> Writer writerFromDataObject(@NonNull DataObject object, Class<T> dataObjectClass,
             ConvertType<T> convertType) {
         Writer writer = new StringWriter();
         JsonWriter jsonWriter = new JsonWriter(writer);
@@ -116,7 +116,7 @@ public final class JSONDataObjectConverter extends AbstractDataObjectConverter {
     }
 
     @Override
-    public <T extends DataObject> Writer writerFromRpcDataObject(@Nonnull DataObject object, Class<T> dataObjectClass,
+    public <T extends DataObject> Writer writerFromRpcDataObject(@NonNull DataObject object, Class<T> dataObjectClass,
             ConvertType<T> convertType, QName rpcOutputQName, String rpcName) {
         return null;
     }
index da2ff82154319f95cf2b4076d20cbd3590789791..78e738dca1b476e88a6e16f92d106f4cc8086d3b 100644 (file)
@@ -14,7 +14,6 @@ import java.io.StringWriter;
 import java.io.Writer;
 import java.net.URISyntaxException;
 import java.util.Optional;
-import javax.annotation.Nonnull;
 import javax.xml.XMLConstants;
 import javax.xml.parsers.FactoryConfigurationError;
 import javax.xml.stream.XMLInputFactory;
@@ -22,6 +21,7 @@ import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
 import org.opendaylight.transportpce.test.DataStoreContext;
 import org.opendaylight.yangtools.yang.binding.DataObject;
@@ -70,7 +70,7 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter {
      * @param dataStoreContextUtil datastore context util used to extract codec and schema context
      * @return {@link AbstractDataObjectConverter}
      */
-    public static XMLDataObjectConverter createWithDataStoreUtil(@Nonnull DataStoreContext dataStoreContextUtil) {
+    public static XMLDataObjectConverter createWithDataStoreUtil(@NonNull DataStoreContext dataStoreContextUtil) {
         BindingNormalizedNodeSerializer bindingToNormalizedNodeCodec =
                 dataStoreContextUtil.getBindingDOMCodecServices();
         return new XMLDataObjectConverter(dataStoreContextUtil.getSchemaContext(), bindingToNormalizedNodeCodec);
@@ -83,8 +83,8 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter {
      * @param codecRegistry codec registry used for converting
      * @return new {@link XMLDataObjectConverter}
      */
-    public static XMLDataObjectConverter createWithSchemaContext(@Nonnull EffectiveModelContext schemaContext,
-            @Nonnull BindingNormalizedNodeSerializer codecRegistry) {
+    public static XMLDataObjectConverter createWithSchemaContext(@NonNull EffectiveModelContext schemaContext,
+            @NonNull BindingNormalizedNodeSerializer codecRegistry) {
         return new XMLDataObjectConverter(schemaContext, codecRegistry);
     }
 
@@ -95,7 +95,7 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter {
      * @return {@link Optional} instance of {@link NormalizedNode}.
      */
     @Override
-    public Optional<NormalizedNode> transformIntoNormalizedNode(@Nonnull InputStream inputStream) {
+    public Optional<NormalizedNode> transformIntoNormalizedNode(@NonNull InputStream inputStream) {
         try {
             XMLStreamReader reader = this.xmlInputFactory.createXMLStreamReader(inputStream);
             return parseInputXML(reader);
@@ -106,7 +106,7 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter {
     }
 
     @Override
-    public Optional<NormalizedNode> transformIntoNormalizedNode(@Nonnull Reader inputReader) {
+    public Optional<NormalizedNode> transformIntoNormalizedNode(@NonNull Reader inputReader) {
         try {
             XMLStreamReader reader = this.xmlInputFactory.createXMLStreamReader(inputReader);
             return parseInputXML(reader);
@@ -127,7 +127,7 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter {
      * @param inputReader of the given XML
      * @return {@link Optional} instance of {@link NormalizedNode}.
      */
-    public Optional<NormalizedNode> transformInschemaContexttoNormalizedNode(@Nonnull Reader inputReader) {
+    public Optional<NormalizedNode> transformInschemaContexttoNormalizedNode(@NonNull Reader inputReader) {
         try {
             XMLStreamReader reader = this.xmlInputFactory.createXMLStreamReader(inputReader);
             return parseInputXML(reader);
@@ -138,7 +138,7 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter {
     }
 
     @Override
-    public <T extends DataObject> Writer writerFromRpcDataObject(@Nonnull DataObject object, Class<T> dataObjectClass,
+    public <T extends DataObject> Writer writerFromRpcDataObject(@NonNull DataObject object, Class<T> dataObjectClass,
             ConvertType<T> convertType, QName rpcOutputQName, String rpcName) {
         Writer writer = new StringWriter();
         XMLStreamWriter xmlStreamWriter = createXmlStreamWriter(writer);
@@ -169,7 +169,7 @@ public final class XMLDataObjectConverter extends AbstractDataObjectConverter {
      *
      */
     @Override
-    public <T extends DataObject> Writer writerFromDataObject(@Nonnull DataObject object, Class<T> dataObjectClass,
+    public <T extends DataObject> Writer writerFromDataObject(@NonNull DataObject object, Class<T> dataObjectClass,
             ConvertType<T> convertType) {
 
         Writer writer = new StringWriter();
index 362a40b638b9c8570bb285b839cae2693033c6c3..7f037648c5ff239361dcdebe96927b5b5abd0128 100644 (file)
@@ -5,11 +5,9 @@
  * 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.transportpce.test.stub;
 
 import java.util.Optional;
-import javax.annotation.Nonnull;
 import org.opendaylight.mdsal.binding.api.BindingService;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.mdsal.binding.api.MountPoint;
@@ -43,7 +41,6 @@ public class MountPointStub implements MountPoint {
         return Optional.empty();
     }
 
-    @Nonnull
     @Override
     public InstanceIdentifier<?> getIdentifier() {
         throw new UnsupportedOperationException();
index a67edb21e9987e95ec5232a9e20cdc63e1d16f28..b818b75e6f5537d8e55bf86701fd923ab6750d82 100644 (file)
@@ -32,7 +32,7 @@ public final class TopologyDataUtils {
 
     private static final Logger LOG = LoggerFactory.getLogger(TopologyDataUtils.class);
 
-    @SuppressWarnings({"unchecked","rawtypes"})
+    @SuppressWarnings("rawtypes")
     // FIXME check if the InstanceIdentifier raw type can be avoided
     // Raw types use are discouraged since they lack type safety.
     // Resulting Problems are observed at run time and not at compile time