BUG-272: Fixed last checkstyle offenders & activate checkstyle enforcement
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / test / java / org / opendaylight / controller / md / sal / dom / broker / impl / DOMTransactionChainTest.java
index b360cb1694eab7224980ed6ed078f39a51942e1e..2a955e5f4215e6dccc0c397ca9c0850ccb159aa3 100644 (file)
@@ -71,8 +71,8 @@ public class DOMTransactionChainTest {
 
         /**
          * We alocate new read-write transaction and write /test
-         * 
-         * 
+         *
+         *
          */
         DOMDataReadWriteTransaction firstTx = allocateAndWrite(txChain);
 
@@ -88,19 +88,19 @@ public class DOMTransactionChainTest {
         DOMDataReadTransaction secondReadTx = txChain.newReadOnlyTransaction();
 
         /**
-         * 
+         *
          * We test if we are able to read data from tx, read should not fail
          * since we are using chained transaction.
-         * 
-         * 
+         *
+         *
          */
         assertTestContainerExists(secondReadTx);
 
         /**
-         * 
+         *
          * We alocate next transaction, which is still based on first one, but
          * is read-write.
-         * 
+         *
          */
         DOMDataReadWriteTransaction thirdDeleteTx = allocateAndDelete(txChain);
 
@@ -111,7 +111,7 @@ public class DOMTransactionChainTest {
 
         /**
          * We commit first transaction
-         * 
+         *
          */
         assertCommitSuccessful(firstWriteTxFuture);
 
@@ -124,7 +124,7 @@ public class DOMTransactionChainTest {
         assertTestContainerExists(storeReadTx);
         /**
          * We commit third transaction
-         * 
+         *
          */
         assertCommitSuccessful(thirdDeleteTxFuture);
 
@@ -144,8 +144,8 @@ public class DOMTransactionChainTest {
 
         /**
          * We alocate new read-write transaction and write /test
-         * 
-         * 
+         *
+         *
          */
         allocateAndWrite(txChain);
 
@@ -155,21 +155,21 @@ public class DOMTransactionChainTest {
          * IllegalStateException.
          */
         try {
-            DOMDataReadTransaction secondReadTx = txChain.newReadOnlyTransaction();
+            txChain.newReadOnlyTransaction();
             fail("Allocation of secondReadTx should fail with IllegalStateException");
         } catch (Exception e) {
             assertTrue(e instanceof IllegalStateException);
         }
     }
 
-    private static DOMDataReadWriteTransaction allocateAndDelete(DOMTransactionChain txChain)
+    private static DOMDataReadWriteTransaction allocateAndDelete(final DOMTransactionChain txChain)
             throws InterruptedException, ExecutionException {
         DOMDataReadWriteTransaction tx = txChain.newReadWriteTransaction();
 
         /**
          * We test existence of /test in third transaction container should
          * still be visible from first one (which is still uncommmited).
-         * 
+         *
          */
         assertTestContainerExists(tx);
 
@@ -180,28 +180,28 @@ public class DOMTransactionChainTest {
         return tx;
     }
 
-    private static DOMDataReadWriteTransaction allocateAndWrite(DOMTransactionChain txChain)
+    private static DOMDataReadWriteTransaction allocateAndWrite(final DOMTransactionChain txChain)
             throws InterruptedException, ExecutionException {
         DOMDataReadWriteTransaction tx = txChain.newReadWriteTransaction();
         assertTestContainerWrite(tx);
         return tx;
     }
 
-    private static void assertCommitSuccessful(ListenableFuture<RpcResult<TransactionStatus>> future)
+    private static void assertCommitSuccessful(final ListenableFuture<RpcResult<TransactionStatus>> future)
             throws InterruptedException, ExecutionException {
         RpcResult<TransactionStatus> rpcResult = future.get();
         assertTrue(rpcResult.isSuccessful());
         assertEquals(TransactionStatus.COMMITED, rpcResult.getResult());
     }
 
-    private static void assertTestContainerExists(DOMDataReadTransaction readTx) throws InterruptedException,
+    private static void assertTestContainerExists(final DOMDataReadTransaction readTx) throws InterruptedException,
             ExecutionException {
         ListenableFuture<Optional<NormalizedNode<?, ?>>> readFuture = readTx.read(OPERATIONAL, TestModel.TEST_PATH);
         Optional<NormalizedNode<?, ?>> readedData = readFuture.get();
         assertTrue(readedData.isPresent());
     }
 
-    private static void assertTestContainerWrite(DOMDataReadWriteTransaction tx) throws InterruptedException,
+    private static void assertTestContainerWrite(final DOMDataReadWriteTransaction tx) throws InterruptedException,
             ExecutionException {
         tx.put(OPERATIONAL, TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME));
         assertTestContainerExists(tx);