summaryrefslogtreecommitdiffstats
path: root/infra/data-impl
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-11-22 16:35:20 +0100
committerMarek Gradzki <mgradzki@cisco.com>2017-11-22 16:55:36 +0100
commit32c5f8d8e44298052e472bddd634a0fb684721f9 (patch)
treec97639efa5f7122d0f828a9c2cb56b39ed5de700 /infra/data-impl
parentca6abb7ac148362b74d29c062df80d0ad67e723f (diff)
Cleanup various Sonar warings
Unused code, imports, etc. Change-Id: Icb19d6a877d5ddbfd85caa86c4e62880e4db3c44 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/data-impl')
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeManager.java4
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadWriteTransaction.java6
-rw-r--r--infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java7
-rw-r--r--infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java3
4 files changed, 6 insertions, 14 deletions
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeManager.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeManager.java
index dfb053f..48b9e79 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeManager.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ModifiableDataTreeManager.java
@@ -18,15 +18,13 @@ package io.fd.honeycomb.data.impl;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.util.concurrent.Futures.immediateCheckedFuture;
-import static org.apache.commons.lang3.builder.ToStringStyle.MULTI_LINE_STYLE;
import com.google.common.base.Optional;
import com.google.common.util.concurrent.CheckedFuture;
-import io.fd.honeycomb.data.ModifiableDataManager;
import io.fd.honeycomb.data.DataModification;
+import io.fd.honeycomb.data.ModifiableDataManager;
import io.fd.honeycomb.translate.TranslationException;
import javax.annotation.Nonnull;
-
import org.apache.commons.lang3.builder.RecursiveToStringStyle;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadWriteTransaction.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadWriteTransaction.java
index a746f12..f2301d7 100644
--- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadWriteTransaction.java
+++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadWriteTransaction.java
@@ -20,9 +20,9 @@ import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.ListenableFuture;
+import javax.annotation.Nonnull;
import org.apache.commons.lang3.builder.RecursiveToStringStyle;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
@@ -37,10 +37,6 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.annotation.Nonnull;
-
-import static org.apache.commons.lang3.builder.ToStringStyle.MULTI_LINE_STYLE;
-
/**
* Composite DOM transaction that delegates reads to a {@link DOMDataReadTransaction} delegate and writes to a {@link
* DOMDataWriteTransaction} delegate.
diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java
index f1bc310..4a0fb11 100644
--- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java
+++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/DataBrokerTest.java
@@ -22,9 +22,9 @@ import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
-import io.fd.honeycomb.data.ReadableDataManager;
-import io.fd.honeycomb.data.ModifiableDataManager;
import io.fd.honeycomb.data.DataModification;
+import io.fd.honeycomb.data.ModifiableDataManager;
+import io.fd.honeycomb.data.ReadableDataManager;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
@@ -36,7 +36,6 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataBrokerExtension;
import org.opendaylight.controller.md.sal.dom.api.DOMDataChangeListener;
import org.opendaylight.controller.md.sal.dom.api.DOMDataReadOnlyTransaction;
import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
-import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
public class DataBrokerTest {
@@ -69,7 +68,7 @@ public class DataBrokerTest {
@Test
public void testNewWriteOnlyTransaction() {
- final DOMDataWriteTransaction writeTx = broker.newWriteOnlyTransaction();
+ broker.newWriteOnlyTransaction();
// verify that write transactions use config snapshot
verify(confiDataTree).newModification();
diff --git a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java
index ed35295..7e135a2 100644
--- a/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java
+++ b/infra/data-impl/src/test/java/io/fd/honeycomb/data/impl/PersistingDataTreeAdapterTest.java
@@ -135,8 +135,7 @@ public class PersistingDataTreeAdapterTest {
public void testPersisterCreateFile() throws Exception {
// Delete to test file creation
Files.delete(tmpPersistFile);
- final PersistingDataTreeAdapter.JsonPersister jsonPersister =
- new PersistingDataTreeAdapter.JsonPersister(tmpPersistFile, schemaService);
+ new PersistingDataTreeAdapter.JsonPersister(tmpPersistFile, schemaService);
assertTrue(Files.exists(tmpPersistFile));
}
} \ No newline at end of file