BUG-272: Fixed last checkstyle offenders & activate checkstyle enforcement 56/7856/13
authorRobert Varga <rovarga@cisco.com>
Tue, 10 Jun 2014 08:53:49 +0000 (10:53 +0200)
committerTony Tkacik <ttkacik@cisco.com>
Tue, 17 Jun 2014 08:40:37 +0000 (10:40 +0200)
This patch adds xtend-gen to excluded directories and finally removes
the enforcer plugin override -- thus making md-sal components subject to
controller-wide checkstyle rules.

Change-Id: I3ccad778f90e450843122bc904a30a0cd4ca79f3
Signed-off-by: Robert Varga <rovarga@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
13 files changed:
opendaylight/commons/opendaylight/pom.xml
opendaylight/md-sal/pom.xml
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/AbstractDOMForwardedTransactionFactory.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataBrokerTransactionChainImpl.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataCommitErrorListener.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataCommitExecutor.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMDataCommitImplementation.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMForwardedReadOnlyTransaction.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMForwardedReadWriteTransaction.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMForwardedWriteTransaction.java
opendaylight/md-sal/sal-dom-broker/src/main/java/org/opendaylight/controller/md/sal/dom/broker/impl/TransactionCommitFailedExceptionMapper.java
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/BlockingTransactionChainListener.java
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMTransactionChainTest.java

index c58aaf2..92e4ee0 100644 (file)
           <includeTestSourceDirectory>true</includeTestSourceDirectory>
           <sourceDirectory>${project.basedir}</sourceDirectory>
           <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat</includes>
-          <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/${jmxGeneratorPath}\/,**\/${salGeneratorPath}\/</excludes>
+          <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/${jmxGeneratorPath}\/,**\/${salGeneratorPath}\/,**\/xtend-gen\/</excludes>
         </configuration>
         <dependencies>
           <dependency>
index 9222734..8d4901d 100644 (file)
         <groupId>org.apache.felix</groupId>
         <artifactId>maven-bundle-plugin</artifactId>
       </plugin>
-      <plugin>
-        <!-- FIXME: BUG-272: remove this configuration override -->
-        <!-- replaced with new configuration -->
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.12</version>
-        <configuration>
-          <failsOnError>false</failsOnError>
-          <failOnViolation>false</failOnViolation>
-          <configLocation>checkstyle-logging.xml</configLocation>
-          <consoleOutput>true</consoleOutput>
-          <includeTestSourceDirectory>true</includeTestSourceDirectory>
-          <sourceDirectory>${project.basedir}</sourceDirectory>
-          <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
-          <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/${jmxGeneratorPath}\/,**\/${salGeneratorPath}\/</excludes>
-        </configuration>
-        <dependencies>
-          <dependency>
-            <groupId>org.opendaylight.yangtools</groupId>
-            <artifactId>checkstyle-logging</artifactId>
-            <version>${yangtools.version}</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-jar-plugin</artifactId>
index 7b5ea11..2203087 100644 (file)
@@ -20,8 +20,6 @@ import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
 import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
 import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransactionFactory;
 import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
-import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap;
@@ -68,7 +66,7 @@ public abstract class AbstractDOMForwardedTransactionFactory<T extends DOMStoreT
      *
      * Subtransaction for reading is selected by supplied
      * {@link LogicalDatastoreType} as parameter for
-     * {@link DOMDataReadTransaction#read(LogicalDatastoreType, InstanceIdentifier)}
+     * {@link DOMDataReadTransaction#read(LogicalDatastoreType,org.opendaylight.yangtools.yang.data.api.InstanceIdentifier)}
      * .
      *
      * Id of returned transaction is retrieved via
@@ -99,19 +97,19 @@ public abstract class AbstractDOMForwardedTransactionFactory<T extends DOMStoreT
      *
      * <ul>
      * <li>
-     * {@link DOMDataWriteTransaction#put(LogicalDatastoreType, InstanceIdentifier, NormalizedNode)}
+     * {@link DOMDataWriteTransaction#put(LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * - backing subtransaction is selected by {@link LogicalDatastoreType},
-     * {@link DOMStoreWriteTransaction#write(InstanceIdentifier, NormalizedNode)}
+     * {@link DOMStoreWriteTransaction#write(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * is invoked on selected subtransaction.
      * <li>
-     * {@link DOMDataWriteTransaction#merge(LogicalDatastoreType, InstanceIdentifier, NormalizedNode)}
+     * {@link DOMDataWriteTransaction#merge(LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * - backing subtransaction is selected by {@link LogicalDatastoreType},
-     * {@link DOMStoreWriteTransaction#merge(InstanceIdentifier, NormalizedNode)}
+     * {@link DOMStoreWriteTransaction#merge(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * is invoked on selected subtransaction.
      * <li>
-     * {@link DOMDataWriteTransaction#delete(LogicalDatastoreType, InstanceIdentifier)
+     * {@link DOMDataWriteTransaction#delete(LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.InstanceIdentifier)
      * - backing subtransaction is selected by {@link LogicalDatastoreType},
-     * {@link DOMStoreWriteTransaction#delete(InstanceIdentifier)} is invoked on
+     * {@link DOMStoreWriteTransaction#delete(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier)} is invoked on
      * selected subtransaction.
      * <li> {@link DOMDataWriteTransaction#commit()} - results in invoking
      * {@link DOMStoreWriteTransaction#ready()}, gathering all resulting cohorts
@@ -147,24 +145,24 @@ public abstract class AbstractDOMForwardedTransactionFactory<T extends DOMStoreT
      *
      * <ul>
      * <li>
-     * {@link DOMDataWriteTransaction#read(LogicalDatastoreType, InstanceIdentifier)}
+     * {@link DOMDataWriteTransaction#read(LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.InstanceIdentifier)}
      * - backing subtransaction is selected by {@link LogicalDatastoreType},
-     * {@link DOMStoreWriteTransaction#read(InstanceIdentifier)} is invoked on
+     * {@link DOMStoreWriteTransaction#read(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier)} is invoked on
      * selected subtransaction.
      * <li>
-     * {@link DOMDataWriteTransaction#put(LogicalDatastoreType, InstanceIdentifier, NormalizedNode)}
+     * {@link DOMDataWriteTransaction#put(LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * - backing subtransaction is selected by {@link LogicalDatastoreType},
-     * {@link DOMStoreWriteTransaction#write(InstanceIdentifier, NormalizedNode)}
+     * {@link DOMStoreWriteTransaction#write(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * is invoked on selected subtransaction.
      * <li>
-     * {@link DOMDataWriteTransaction#merge(LogicalDatastoreType, InstanceIdentifier, NormalizedNode)}
+     * {@link DOMDataWriteTransaction#merge(LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * - backing subtransaction is selected by {@link LogicalDatastoreType},
-     * {@link DOMStoreWriteTransaction#merge(InstanceIdentifier, NormalizedNode)}
+     * {@link DOMStoreWriteTransaction#merge(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)}
      * is invoked on selected subtransaction.
      * <li>
-     * {@link DOMDataWriteTransaction#delete(LogicalDatastoreType, InstanceIdentifier)
+     * {@link DOMDataWriteTransaction#delete(LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.InstanceIdentifier)
      * - backing subtransaction is selected by {@link LogicalDatastoreType},
-     * {@link DOMStoreWriteTransaction#delete(InstanceIdentifier)} is invoked on
+     * {@link DOMStoreWriteTransaction#delete(org.opendaylight.yangtools.yang.data.api.InstanceIdentifier)} is invoked on
      * selected subtransaction.
      * <li> {@link DOMDataWriteTransaction#commit()} - results in invoking
      * {@link DOMStoreWriteTransaction#ready()}, gathering all resulting cohorts
index bcefc25..b9f096a 100644 (file)
@@ -12,7 +12,6 @@ import javax.annotation.concurrent.GuardedBy;
 
 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.TransactionChain;
 import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
@@ -28,9 +27,9 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /**
- * NormalizedNode implementation of {@link TransactionChain} which is backed
+ * NormalizedNode implementation of {@link org.opendaylight.controller.md.sal.common.api.data.TransactionChain} which is backed
  * by several {@link DOMStoreTransactionChain} differentiated by provided
- * {@link LogicalDatastoreType} type.
+ * {@link org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType} type.
  *
  */
 public class DOMDataBrokerTransactionChainImpl extends AbstractDOMForwardedTransactionFactory<DOMStoreTransactionChain>
index 3a4b54e..80bc669 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.controller.md.sal.dom.broker.impl;
 
 import java.util.EventListener;
 
-import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
 
 /**
@@ -21,7 +20,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction;
  * failure is visible to client code.
  *
  * This is internal API for MD-SAL implementations, for consumer facing error
- * listeners see {@link TransactionChainListener}.
+ * listeners see {@link org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener}.
  *
  */
 interface DOMDataCommitErrorListener extends EventListener {
index f233912..2050d14 100644 (file)
@@ -18,21 +18,21 @@ import com.google.common.util.concurrent.ListenableFuture;
 /**
  * Executor of Three Phase Commit coordination for
  * {@link DOMDataWriteTransaction} transactions.
- * 
+ *
  * Implementations are responsible for executing implementation of three-phase
  * commit protocol on supplied {@link DOMStoreThreePhaseCommitCohort}s.
- * 
- * 
+ *
+ *
  */
 interface DOMDataCommitExecutor {
 
     /**
      * Submits supplied transaction to be executed in context of provided
      * cohorts.
-     * 
+     *
      * Transaction is used only as a context, cohorts should be associated with
      * this transaction.
-     * 
+     *
      * @param tx
      *            Transaction to be used as context for reporting
      * @param cohort
@@ -43,7 +43,7 @@ interface DOMDataCommitExecutor {
      * @return ListenableFuture which contains RpcResult with
      *         {@link TransactionStatus#COMMITED} if commit coordination on
      *         cohorts finished successfully.
-     * 
+     *
      */
     ListenableFuture<RpcResult<TransactionStatus>> submit(DOMDataWriteTransaction tx,
             Iterable<DOMStoreThreePhaseCommitCohort> cohort, Optional<DOMDataCommitErrorListener> listener);
index ca2d711..4906b6e 100644 (file)
@@ -15,28 +15,29 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /**
- * 
+ *
  * Implementation prototype of commit method for
  * {@link DOMForwardedWriteTransaction}.
- * 
+ *
  */
 public interface DOMDataCommitImplementation {
 
     /**
      * User-supplied implementation of {@link DOMDataWriteTransaction#commit()}
      * for transaction.
-     * 
+     *
      * Callback invoked when {@link DOMDataWriteTransaction#commit()} is invoked
      * on transaction created by this factory.
-     * 
+     *
      * @param transaction
      *            Transaction on which {@link DOMDataWriteTransaction#commit()}
      *            was invoked.
      * @param cohorts
      *            Iteration of cohorts for subtransactions associated with
      *            commited transaction.
-     * 
+     *
      */
     ListenableFuture<RpcResult<TransactionStatus>> commit(final DOMDataWriteTransaction transaction,
             final Iterable<DOMStoreThreePhaseCommitCohort> cohorts);
 }
+
index be55911..d2543f0 100644 (file)
@@ -18,7 +18,7 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /**
- * 
+ *
  * Read Only Transaction, which is composed of several
  * {@link DOMStoreReadTransaction} transactions. Subtransaction is selected by
  * {@link LogicalDatastoreType} type parameter in
@@ -39,4 +39,4 @@ class DOMForwardedReadOnlyTransaction extends
         return getSubtransaction(store).read(path);
     }
 
-}
\ No newline at end of file
+}
index 956e169..f5b96e2 100644 (file)
@@ -8,9 +8,7 @@
 
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
 import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction;
-import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
 import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction;
-import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
@@ -19,11 +17,11 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /**
- * 
+ *
  * Read-Write Transaction, which is composed of several
- * {@link DOMStoreReadTransaction} transactions. Subtransaction is selected by
+ * {@link DOMStoreReadWriteTransaction} transactions. Subtransaction is selected by
  * {@link LogicalDatastoreType} type parameter in:
- * 
+ *
  * <ul>
  * <li>{@link #read(LogicalDatastoreType, InstanceIdentifier)}
  * <li>{@link #put(LogicalDatastoreType, InstanceIdentifier, NormalizedNode)}
@@ -32,10 +30,11 @@ import com.google.common.util.concurrent.ListenableFuture;
  * </ul>
  * {@link #commit()} will result in invocation of
  * {@link DOMDataCommitImplementation#commit(org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction, Iterable)}
- * invocation with all {@link DOMStoreThreePhaseCommitCohort} for underlying
+ * invocation with all {@link org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort} for underlying
  * transactions.
- * 
+ *
  */
+
 class DOMForwardedReadWriteTransaction extends DOMForwardedWriteTransaction<DOMStoreReadWriteTransaction> implements
         DOMDataReadWriteTransaction {
 
index 199438f..eeb345e 100644 (file)
@@ -14,7 +14,6 @@ import javax.annotation.concurrent.GuardedBy;
 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.dom.api.DOMDataWriteTransaction;
-import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadTransaction;
 import org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort;
 import org.opendaylight.controller.sal.core.spi.data.DOMStoreWriteTransaction;
 import org.opendaylight.yangtools.yang.common.RpcResult;
@@ -27,12 +26,12 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /**
- * /**
- * 
+ *
+ *
  * Read-Write Transaction, which is composed of several
- * {@link DOMStoreReadTransaction} transactions. Subtransaction is selected by
+ * {@link DOMStoreWriteTransaction} transactions. Subtransaction is selected by
  * {@link LogicalDatastoreType} type parameter in:
- * 
+ *
  * <ul>
  * <li>{@link #put(LogicalDatastoreType, InstanceIdentifier, NormalizedNode)}
  * <li>{@link #delete(LogicalDatastoreType, InstanceIdentifier)}
@@ -41,9 +40,9 @@ import com.google.common.util.concurrent.ListenableFuture;
  * <p>
  * {@link #commit()} will result in invocation of
  * {@link DOMDataCommitImplementation#commit(org.opendaylight.controller.md.sal.dom.api.DOMDataWriteTransaction, Iterable)}
- * invocation with all {@link DOMStoreThreePhaseCommitCohort} for underlying
+ * invocation with all {@link org.opendaylight.controller.sal.core.spi.data.DOMStoreThreePhaseCommitCohort} for underlying
  * transactions.
- * 
+ *
  * @param <T>
  *            Subtype of {@link DOMStoreWriteTransaction} which is used as
  *            subtransaction.
index 87bd6c8..258b068 100644 (file)
@@ -13,14 +13,13 @@ import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFaile
 
 import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
-import com.google.common.util.concurrent.Futures;
 
 /**
  *
  * Utility exception mapper which translates {@link Exception}
  * to {@link TransactionCommitFailedException}.
  *
- * This mapper is intended to be used with {@link Futures#makeChecked(com.google.common.util.concurrent.ListenableFuture, Function)}
+ * This mapper is intended to be used with {@link com.google.common.util.concurrent.Futures#makeChecked(com.google.common.util.concurrent.ListenableFuture, Function)}
  * <ul>
  * <li>if exception is {@link TransactionCommitFailedException} or one of its subclasses returns original exception.
  * <li>if exception is {@link ExecutionException} and cause is  {@link TransactionCommitFailedException} return cause
@@ -28,6 +27,7 @@ import com.google.common.util.concurrent.Futures;
  * </ul>
  *
  */
+
 final class TransactionCommitFailedExceptionMapper implements
         Function<Exception, TransactionCommitFailedException> {
 
index f9c301c..5b531fe 100644 (file)
@@ -15,11 +15,11 @@ import com.google.common.util.concurrent.SettableFuture;
 
 /**
  * Simple implementation of {@link TransactionChainListener} for testing.
- * 
+ *
  * This transaction chain listener does not contain any logic, only update
  * futures ({@link #getFailFuture()} and {@link #getSuccessFuture()} when
  * transaction chain event is retrieved.
- * 
+ *
  */
 class BlockingTransactionChainListener implements TransactionChainListener {
 
@@ -27,13 +27,13 @@ class BlockingTransactionChainListener implements TransactionChainListener {
     private final SettableFuture<Void> successFuture = SettableFuture.create();
 
     @Override
-    public void onTransactionChainFailed(TransactionChain<?, ?> chain, AsyncTransaction<?, ?> transaction,
-            Throwable cause) {
+    public void onTransactionChainFailed(final TransactionChain<?, ?> chain, final AsyncTransaction<?, ?> transaction,
+            final Throwable cause) {
         failFuture.set(cause);
     }
 
     @Override
-    public void onTransactionChainSuccessful(TransactionChain<?, ?> chain) {
+    public void onTransactionChainSuccessful(final TransactionChain<?, ?> chain) {
         successFuture.set(null);
     }
 
index b360cb1..2a955e5 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);

©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.