Fixed Checkstyle violation errors in mdsal-common-api 12/42812/10
authorColin Dixon <colin@colindixon.com>
Fri, 29 Jul 2016 22:26:32 +0000 (15:26 -0700)
committerRobert Varga <nite@hq.sk>
Tue, 9 Aug 2016 14:03:23 +0000 (14:03 +0000)
removed SupressWarning for CheckStyle violation errors
changed checkStyleViolationSeverity=error to warning as per code review comments
Implimented some more code review comments, reverted back to checkStyleViolationSeverity=error  from warning.

Change-Id: I0b79f06ba6056d0813e8ddf7bad8896e7931b1e6
Signed-off-by: Brinda Jana <brinda.jana@nexusis.com>
Signed-off-by: Colin Dixon <colin@colindixon.com>
17 files changed:
common/mdsal-common-api/pom.xml
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/AsyncDataBroker.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/AsyncDataTransactionFactory.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/AsyncReadTransaction.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/AsyncTransaction.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/AsyncWriteTransaction.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/DataValidationFailedException.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/LogicalDatastoreType.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/OptimisticLockFailedException.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/PostCanCommitStep.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/PostPreCommitStep.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/ReadFailedException.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/ThreePhaseCommitStep.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/TransactionChain.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/TransactionCommitDeadlockException.java
common/mdsal-common-api/src/main/java/org/opendaylight/mdsal/common/api/TransactionCommitFailedException.java
common/pom.xml

index fb9a0287d18c0821a4a04b82e83612d3ac1c97a5..888200aa5eabb4f1ab32f35f2752f5d9aad3ba11 100644 (file)
     </dependency>
   </dependencies>
 
+  <build>
+      <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <configuration>
+                    <propertyExpansion>checkstyle.violationSeverity=error</propertyExpansion>
+                </configuration>
+            </plugin>
+        </plugins>
+  </build>
+
   <scm>
     <connection>scm:git:http://git.opendaylight.org/gerrit/mdsal.git</connection>
     <developerConnection>scm:git:ssh://git.opendaylight.org:29418/mdsal.git</developerConnection>
index 4da63ebb6a0e7cc5ff8efb55deed7065b2c24579..a441f528812ab66e621451b0e2050f890e5edd3f 100644 (file)
@@ -7,11 +7,10 @@
  */
 package org.opendaylight.mdsal.common.api;
 
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
 import org.opendaylight.yangtools.concepts.Path;
 
+
 /**
- *
  * Base interface that provides access to a conceptual data tree store and also provides the ability
  * to subscribe for changes to data under a given branch of the tree.
  *
@@ -49,16 +48,11 @@ import org.opendaylight.yangtools.concepts.Path;
 public interface AsyncDataBroker<P extends Path<P>, D> extends
         AsyncDataTransactionFactory<P, D> {
 
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
     AsyncReadTransaction<P, D> newReadOnlyTransaction();
 
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     AsyncWriteTransaction<P, D> newWriteOnlyTransaction();
 }
index ea59a07eb2fb2ac76319ccc73be6bf5627155b6f..8d629b77f42d3728b1a45ef84513e2600e035663 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.mdsal.common.api;
 
 import org.opendaylight.yangtools.concepts.Path;
 
+
 /**
  * A factory which allocates new transactions to operate on the data tree.
  *
@@ -42,6 +43,7 @@ import org.opendaylight.yangtools.concepts.Path;
  * example, implementations may optimize the transaction for reading if they know ahead of time that
  * you only need to read data - such as not keeping additional meta-data, which may be required for
  * write transactions.
+ *
  * <p>
  * <b>Implementation Note:</b> This interface is not intended to be implemented by users of MD-SAL,
  * but only to be consumed by them.
@@ -57,6 +59,7 @@ public interface AsyncDataTransactionFactory<P extends Path<P>, D> {
     /**
      * Allocates a new read-only transaction which provides an immutable snapshot of
      * the data tree.
+     *
      *<p>
      * The view of data tree is an immutable snapshot of current data tree state when
      * transaction was allocated.
@@ -78,6 +81,7 @@ public interface AsyncDataTransactionFactory<P extends Path<P>, D> {
      * Since this transaction does not provide a view of the data it SHOULD BE used only by callers
      * which are exclusive writers (exporters of data) to the subtree they modify. This prevents
      * optimistic lock failures as described in {@link AsyncWriteTransaction#submit()}.
+     *
      * <p>
      * Exclusivity of writers to particular subtree SHOULD BE enforced by external locking
      * mechanism.
index 258e34eed06e9c8aedae3b7d3b32c98ff6582237..7fe45b8b0ab870d27044861d708efd62f00e727c 100644 (file)
@@ -9,8 +9,8 @@ package org.opendaylight.mdsal.common.api;
 
 import org.opendaylight.yangtools.concepts.Path;
 
+
 /**
- *
  * Marker interface for stateful read view of the data tree.
  *
  * <p>
@@ -28,15 +28,11 @@ import org.opendaylight.yangtools.concepts.Path;
  * <pre>
  * txRead = broker.newReadOnlyTransaction(); // read Transaction is snapshot of data
  * txWrite = broker.newReadWriteTransactoin(); // concurrent write transaction
- * 
  * txRead.read(OPERATIONAL, PATH).get(); // will return Optional containing A
  * txWrite = broker.put(OPERATIONAL, PATH, B); // writes B to PATH
- * 
  * txRead.read(OPERATIONAL, PATH).get(); // still returns Optional containing A
- * 
  * txWrite.submit().get(); // data tree is updated, PATH contains B
  * txRead.read(OPERATIONAL, PATH).get(); // still returns Optional containing A
- * 
  * txAfterCommit = broker.newReadOnlyTransaction(); // read Transaction is snapshot of new state
  * txAfterCommit.read(OPERATIONAL, PATH).get(); // returns Optional containing B;
  * </pre>
@@ -46,7 +42,8 @@ import org.opendaylight.yangtools.concepts.Path;
  * after other asynchronous action. Use of blocking call
  * {@link com.google.common.util.concurrent.ListenableFuture#get()} is discouraged for most uses and
  * you should use
- * {@link com.google.common.util.concurrent.Futures#addCallback(com.google.common.util.concurrent.ListenableFuture, com.google.common.util.concurrent.FutureCallback)}
+ * {@link com.google.common.util.concurrent.Futures#addCallback(com.google.common.util.concurrent.
+ * ListenableFuture, com.google.common.util.concurrent.FutureCallback)}
  * or other functions from {@link com.google.common.util.concurrent.Futures} to register more
  * specific listeners.
  *
@@ -61,5 +58,5 @@ public interface AsyncReadTransaction<P extends Path<P>, D> extends AsyncTransac
      *
      */
     @Override
-    public void close();
+    void close();
 }
index 9d11778c7b271a94b63810213428fe7f879cd66e..546317ea715a3851ea1b40fab069f16f0d5dc27e 100644 (file)
@@ -12,9 +12,7 @@ import org.opendaylight.yangtools.concepts.Path;
 
 
 /**
- *
  * A common parent for all transactions which operate on a conceptual data tree.
- *
  * See derived transaction types for more concrete behavior:
  * <ul>
  * <li>{@link AsyncReadTransaction} - Read capabilities, user is able to read data from data tree</li>
index 06d71ed2e26ab53ea1232a5eecd68cbbae20941d..c8ef5e4e5c24bbb4177fcd360763fd6a8e30dda8 100644 (file)
@@ -18,11 +18,13 @@ import org.opendaylight.yangtools.concepts.Path;
  * Initial state of write transaction is a stable snapshot of the current data tree.
  * The state is captured when the transaction is created and its state and underlying
  * data tree are not affected by other concurrently running transactions.
+ *
  * <p>
  * Write transactions are isolated from other concurrent write transactions. All
  * writes are local to the transaction and represent only a proposal of state
  * change for the data tree and it is not visible to any other concurrently running
  * transaction.
+ *
  * <p>
  * Applications make changes to the local data tree in the transaction by via the
  * <b>put</b>, <b>merge</b>, and <b>delete</b> operations.
@@ -31,6 +33,7 @@ import org.opendaylight.yangtools.concepts.Path;
  * Stores a piece of data at a specified path. This acts as an add / replace
  * operation, which is to say that whole subtree will be replaced by the
  * specified data.
+ *
  * <p>
  * Performing the following put operations:
  *
@@ -38,7 +41,6 @@ import org.opendaylight.yangtools.concepts.Path;
  * 1) container { list [ a ] }
  * 2) container { list [ b ] }
  * </pre>
- *
  * will result in the following data being present:
  *
  * <pre>
@@ -48,6 +50,7 @@ import org.opendaylight.yangtools.concepts.Path;
  * Merges a piece of data with the existing data at a specified path. Any pre-existing data
  * which is not explicitly overwritten will be preserved. This means that if you store a container,
  * its child lists will be merged.
+ *
  * <p>
  * Performing the following merge operations:
  *
@@ -55,26 +58,27 @@ import org.opendaylight.yangtools.concepts.Path;
  * 1) container { list [ a ] }
  * 2) container { list [ b ] }
  * </pre>
- *
  * will result in the following data being present:
  *
  * <pre>
  * container { list [ a, b ] }
  * </pre>
- *
  * This also means that storing the container will preserve any
  * augmentations which have been attached to it.
  *
  * <h2>Delete operation</h2>
  * Removes a piece of data from a specified path.
+ *
  * <p>
  * After applying changes to the local data tree, applications publish the changes proposed in the
  * transaction by calling {@link #submit} on the transaction. This seals the transaction
  * (preventing any further writes using this transaction) and submits it to be
  * processed and applied to global conceptual data tree.
+ *
  * <p>
  * The transaction commit may fail due to a concurrent transaction modifying and committing data in
  * an incompatible way. See {@link #submit} for more concrete commit failure examples.
+ *
  * <p>
  * <b>Implementation Note:</b> This interface is not intended to be implemented
  * by users of MD-SAL, but only to be consumed by them.
@@ -88,12 +92,9 @@ import org.opendaylight.yangtools.concepts.Path;
 public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransaction<P, D> {
     /**
      * Cancels the transaction.
-     *
      * Transactions can only be cancelled if it was not yet submited.
-     *
      * Invoking cancel() on failed or already canceled will have no effect, and transaction is
      * considered cancelled.
-     *
      * Invoking cancel() on finished transaction (future returned by {@link #submit()} already
      * successfully completed) will always fail (return false).
      *
@@ -116,24 +117,26 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
     /**
      * Submits this transaction to be asynchronously applied to update the logical data tree. The
      * returned CheckedFuture conveys the result of applying the data changes.
+     *
      * <p>
      * <b>Note:</b> It is strongly recommended to process the CheckedFuture result in an
      * asynchronous manner rather than using the blocking get() method. See example usage below.
+     *
      * <p>
      * This call logically seals the transaction, which prevents the client from further changing
      * data tree using this transaction. Any subsequent calls to
      * <code>put(LogicalDatastoreType, Path, Object)</code>,
      * <code>merge(LogicalDatastoreType, Path, Object)</code>,
      * <code>delete(LogicalDatastoreType, Path)</code> will fail with {@link IllegalStateException}.
-     *
      * The transaction is marked as submitted and enqueued into the data store back-end for
      * processing.
      *
      * <p>
      * Whether or not the commit is successful is determined by versioning of the data tree and
      * validation of registered commit participants if the transaction changes the data tree.
+     *
      * <p>
-     * The effects of a successful commit of data depends on listeners 
+     * The effects of a successful commit of data depends on listeners
      * and commit participants that are registered with the data
      * broker.
      * <h3>Example usage:</h3>
@@ -141,16 +144,13 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * <pre>
      *  private void doWrite( final int tries ) {
      *      WriteTransaction writeTx = dataBroker.newWriteOnlyTransaction();
-     * 
      *      MyDataObject data = ...;
      *      InstanceIdentifier&lt;MyDataObject&gt; path = ...;
      *      writeTx.put( LogicalDatastoreType.OPERATIONAL, path, data );
-     * 
      *      Futures.addCallback( writeTx.submit(), new FutureCallback&lt;Void&gt;() {
      *          public void onSuccess( Void result ) {
      *              // succeeded
      *          }
-     * 
      *          public void onFailure( Throwable t ) {
      *              if( t instanceof OptimisticLockFailedException ) {
      *                  if( ( tries - 1 ) &gt; 0 ) {
@@ -169,6 +169,7 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * </pre>
      *
      * <h2>Failure scenarios</h2>
+     *
      * <p>
      * Transaction may fail because of multiple reasons, such as
      * <ul>
@@ -187,13 +188,11 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * </ul>
      *
      * <h3>Change compatibility</h3>
-     *
      * There are several sets of changes which could be considered incompatible between two
      * transactions which are derived from same initial state. Rules for conflict detection applies
      * recursively for each subtree level.
      *
      * <h4>Change compatibility of leafs, leaf-list items</h4>
-     *
      * Following table shows state changes and failures between two concurrent transactions, which
      * are based on same initial state, Tx 1 completes successfully before Tx 2 is submitted.
      *
@@ -271,7 +270,6 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * </table>
      *
      * <h4>Change compatibility of subtrees</h4>
-     *
      * Following table shows state changes and failures between two concurrent transactions, which
      * are based on same initial state, Tx 1 completes successfully before Tx 2 is submitted.
      *
@@ -438,25 +436,20 @@ public interface AsyncWriteTransaction<P extends Path<P>, D> extends AsyncTransa
      * <h3>Examples of failure scenarios</h3>
      *
      * <h4>Conflict of two transactions</h4>
-     *
      * This example illustrates two concurrent transactions, which derived from same initial state
      * of data tree and proposes conflicting modifications.
      *
      * <pre>
      * txA = broker.newWriteTransaction(); // allocates new transaction, data tree is empty
      * txB = broker.newWriteTransaction(); // allocates new transaction, data tree is empty
-     * 
      * txA.put(CONFIGURATION, PATH, A);    // writes to PATH value A
      * txB.put(CONFIGURATION, PATH, B)     // writes to PATH value B
-     * 
      * ListenableFuture futureA = txA.submit(); // transaction A is sealed and submitted
      * ListenebleFuture futureB = txB.submit(); // transaction B is sealed and submitted
      * </pre>
-     *
      * Commit of transaction A will be processed asynchronously and data tree will be updated to
      * contain value <code>A</code> for <code>PATH</code>. Returned {@link ListenableFuture} will
      * successfully complete once state is applied to data tree.
-     *
      * Commit of Transaction B will fail, because previous transaction also modified path in a
      * concurrent way. The state introduced by transaction B will not be applied. Returned
      * {@link ListenableFuture} object will fail with {@link OptimisticLockFailedException}
index cab7290bc4a35e0a936e76925a8a8311c64bdf10..f5059f7637851aa5c986a43755f661fbf7ef87bd 100644 (file)
@@ -7,19 +7,16 @@
  */
 package org.opendaylight.mdsal.common.api;
 
+import com.google.common.base.Preconditions;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
-import com.google.common.base.Preconditions;
 
 /**
- *
  * Failure of asynchronous transaction commit caused by invalid data.
- *
  * This exception is raised and returned when transaction commit
  * failed, because other data submitted via transactions
- *
  *  Clients usually are not able recover from this error condition by
  *  retrieving same transaction, since data introduced by this transaction
  *  are invalid.
@@ -29,9 +26,9 @@ public class DataValidationFailedException extends TransactionCommitFailedExcept
 
     private static final long serialVersionUID = 1L;
 
-    private Path<?> path;
+    private final Path<?> path;
 
-    private Class<? extends Path<?>> pathType;
+    private final Class<? extends Path<?>> pathType;
 
     public <P extends Path<P>> DataValidationFailedException(final Class<P> pathType,final P path,
                                                              final String message, final Throwable cause) {
index af9512d03651a2e50b2198e5b284e0787aa20486..a44eafe1272c20b4c5098a4cb3eedfd193309afe 100644 (file)
@@ -12,7 +12,6 @@ public enum LogicalDatastoreType {
     /**
      * Logical atastore representing operational state of the system
      * and it's components
-     *
      * This datastore is used to describe operational state of
      * the system and it's operation related data.
      *
@@ -21,7 +20,6 @@ public enum LogicalDatastoreType {
     /**
      * Logical Datastore representing configuration state of the system
      * and it's components.
-     *
      * This datastore is used to describe intended state of
      * the system and intended operation mode.
      *
index 1e5b70c7fe5a64e2ea7da9b6800b65f173728116..a5d2c11dfe77cfa021114501f83c51e7b5b9515c 100644 (file)
@@ -8,18 +8,16 @@
 
 package org.opendaylight.mdsal.common.api;
 
-import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
+import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
+
 
 /**
-*
 * Failure of asynchronous transaction commit caused by failure
 * of optimistic locking.
-*
 * This exception is raised and returned when transaction commit
 * failed, because other transaction finished successfully
 * and modified same data as failed transaction.
-*
 *  Clients may recover from this error condition by
 *  retrieving current state and submitting new updated
 *  transaction.
index 05e09a8275c7ef3c688e7bf8e38e0615a9741cc1..eac087d2cf6b18ae305279735313e73c7bb33da1 100644 (file)
@@ -14,9 +14,7 @@ import com.google.common.util.concurrent.ListenableFuture;
 import javax.annotation.Nonnull;
 
 /**
- *
  * User implementation of steps following can-commit in three phase protocol.
- *
  * If no additional visibility into transaction and data being aborted or committed is needed, use
  * {@link #NOOP} implementation.
  *
@@ -26,7 +24,6 @@ public interface PostCanCommitStep extends ThreePhaseCommitStep {
 
     /**
      * No-op implementation of abort, pre-commit and commit steps.
-     *
      * This implementation should be used if user logic does only validation of data and does not
      * need to perform any actions associated with pre-commit, commit or abort.
      */
@@ -52,7 +49,6 @@ public interface PostCanCommitStep extends ThreePhaseCommitStep {
 
     /**
      * Initiates a pre-commit of associated request
-     *
      * Implementation MUST NOT do any blocking calls during this callback, all pre-commit
      * preparation SHOULD happen asynchronously and MUST result in completing returned future
      * object.
index 2941786b417176177d6edeb2b23ca82c5c393583..d3a7760d9d667e3399d35d47ac96e21d0106b7e9 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
 
 /**
- *
  * User implementation of steps following pre-commit from Three-Phase Protocol.
  *
  */
@@ -22,7 +21,6 @@ public interface PostPreCommitStep extends ThreePhaseCommitStep {
     /**
      * No-op implementation of {@link #abort()} and {@link #commit()} method, which always success
      * calls.
-     *
      * This implementation is intended for users which may not need to implement commit and abort
      * method.
      *
@@ -45,12 +43,9 @@ public interface PostPreCommitStep extends ThreePhaseCommitStep {
     ListenableFuture<? extends PostPreCommitStep> NOOP_FUTURE = Futures.immediateFuture(NOOP);
 
     /**
-     *
      * Commits cohort transaction.
-     *
      * This callback is invoked by three-phase commit coordinator if associated data transaction
      * finished pre-commit phase and will be commited.
-     *
      * Implementation should make state, which were derived by implementation from associated data
      * visible.
      *
index d8df889085edaf403b29af7314669f625bf4400e..bab6ef308f37fc595484e7fbf7aeee21700b0956 100644 (file)
@@ -21,10 +21,10 @@ public class ReadFailedException extends OperationFailedException {
 
     public static final ExceptionMapper<ReadFailedException> MAPPER =
             new ExceptionMapper<ReadFailedException>("read", ReadFailedException.class) {
-                @Override
-                protected ReadFailedException newWithCause(String message, Throwable cause) {
-                    return new ReadFailedException(message, cause);
-                }
+        @Override
+        protected ReadFailedException newWithCause(String message, Throwable cause) {
+            return new ReadFailedException(message, cause);
+        }
     };
 
     public ReadFailedException(String message, RpcError... errors) {
index 6495c3cba03347d31ad6f118ae8e466f2e7101f6..3fd8aa8f57534bab1682994e6a1ba242bea01d9f 100644 (file)
@@ -15,7 +15,6 @@ import javax.annotation.Nonnull;
 
 /**
  * Common interface for implementing three-phase commit steps.
- *
  * Actual steps to be implemented are: {@link PostCanCommitStep} and {@link PostPreCommitStep} which
  * allows to customize pre-commit, commit and abort actions.
  *
@@ -27,10 +26,8 @@ public interface ThreePhaseCommitStep {
 
     /**
      * Invoked on transaction aborted.
-     *
      * This callback is invoked by three-phase commit coordinator if associated data transaction
      * will not be commited and is being aborted.
-     *
      * Implementation MUST rollback any changes, which were introduced by implementation based on
      * supplied data.
      *
index c2287442f2c8a1db4951e4bd863cee48ff2ec9d2..d6ef81c7a70b1156fd48696763c96734d1b953a7 100644 (file)
@@ -14,7 +14,6 @@ import org.opendaylight.yangtools.concepts.Path;
  * sequence and each transaction should see the effects of previous committed transactions
  * as they occurred. A chain makes no guarantees of atomicity across the chained transactions -
  * the transactions are committed as soon as possible in the order that they were submitted.
- *
  * This behaviour is different from the default AsyncDataBroker, where a
  * transaction is always created from the current global state, not taking into
  * account any transactions previously committed by the calling thread. Due to
@@ -29,13 +28,11 @@ import org.opendaylight.yangtools.concepts.Path;
  * AsyncReadTransaction t2 = broker.newReadOnlyTransaction();
  * Optional&lt;?&gt; maybeData = t2.read(id).get();
  * </code></pre>
- *
  * it may happen, that it sees maybeData.isPresent() == false, simply because
  * t1 has not completed the processes of being applied and t2 is actually
  * allocated from the previous state. This is obviously bad for users who create
  * incremental state in the datastore and actually read what they write in
  * subsequent transactions.
- *
  * Using a TransactionChain instead of a broker solves this particular problem,
  * and leads to expected behavior: t2 will always see the data written in t1
  * present.
@@ -50,6 +47,7 @@ public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable,
      * The previous write transaction has to be either SUBMITTED
      * ({@link AsyncWriteTransaction#submit submit} was invoked) or CANCELLED
      * ({@link #close close} was invoked).
+     *
      * <p>
      * The returned read-only transaction presents an isolated view of the data if the previous
      * write transaction was successful - in other words, this read-only transaction will see the
@@ -64,7 +62,7 @@ public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable,
      *             if the chain has been closed.
      */
     @Override
-    public AsyncReadTransaction<P, D> newReadOnlyTransaction();
+    AsyncReadTransaction<P, D> newReadOnlyTransaction();
 
     /**
      * Create a new write-only transaction which will continue the chain.
@@ -72,13 +70,15 @@ public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable,
      * <p>
      * The previous write transaction has to be either SUBMITTED
      * ({@link AsyncWriteTransaction#submit submit} was invoked) or CANCELLED
-     * ({@link #close close} was invoked).
+     * ({@link #close close} was invoked)
+     *
      * <p>
      * The returned write-only transaction presents an isolated view of the data if the previous
      * write transaction was successful - in other words, this write-only transaction will see the
      * state changes made by the previous write transaction in the chain. However, state which
      * was introduced by other transactions outside this transaction chain after creation of
-     * the previous transaction is not visible.
+     * the previous transaction is not visible
+     *
      * <p>
      * Committing this write-only transaction using {@link AsyncWriteTransaction#submit submit}
      * will submit the state changes in this transaction to be visible to any subsequent
@@ -91,7 +91,7 @@ public interface TransactionChain<P extends Path<P>, D> extends AutoCloseable,
      *             if the chain has been closed.
      */
     @Override
-    public AsyncWriteTransaction<P, D> newWriteOnlyTransaction();
+    AsyncWriteTransaction<P, D> newWriteOnlyTransaction();
 
     @Override
     void close();
index fd4ea57ff544cf78652cbf9cc1920f046ba22ee8..b251de1021a05986c5cb7f8ce0d11c5fd30cdab9 100644 (file)
@@ -9,10 +9,14 @@
 package org.opendaylight.mdsal.common.api;
 
 import com.google.common.base.Supplier;
+
 import org.opendaylight.yangtools.yang.common.RpcError;
 import org.opendaylight.yangtools.yang.common.RpcError.ErrorType;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 
+
+
+
 /**
  * A type of TransactionCommitFailedException that indicates a situation that would result in a
  * threading deadlock. This can occur if a caller that submits a write transaction tries to perform
@@ -25,10 +29,13 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 public class TransactionCommitDeadlockException extends TransactionCommitFailedException {
     private static final long serialVersionUID = 1L;
     private static final String DEADLOCK_MESSAGE =
-            "An attempt to block on a ListenableFuture via a get method from a write " +
-            "transaction submit was detected that would result in deadlock. The commit " +
-            "result must be obtained asynchronously, e.g. via Futures#addCallback, to avoid deadlock.";
-    private static final RpcError DEADLOCK_RPCERROR = RpcResultBuilder.newError(ErrorType.APPLICATION, "lock-denied", DEADLOCK_MESSAGE);
+            "An attempt to block on a ListenableFuture via a get method from a write "
+                    +
+                    "transaction submit was detected that would result in deadlock. The commit "
+                    +
+                    "result must be obtained asynchronously, e.g. via Futures#addCallback, to avoid deadlock.";
+    private static final RpcError DEADLOCK_RPCERROR =
+            RpcResultBuilder.newError(ErrorType.APPLICATION, "lock-denied", DEADLOCK_MESSAGE);
 
     public static final Supplier<Exception> DEADLOCK_EXCEPTION_SUPPLIER = new Supplier<Exception>() {
         @Override
index 00c0a746a2383626ab5f30300af3f0f2ed1de5fb..8367911b455a528f9970f7da1a5addafeb0cd43b 100644 (file)
@@ -11,9 +11,7 @@ import org.opendaylight.yangtools.yang.common.OperationFailedException;
 import org.opendaylight.yangtools.yang.common.RpcError;
 
 /**
- *
- * Failed commit of asynchronous transaction
- *
+ * Failed commit of asynchronous transaction.
  * This exception is raised and returned when transaction commit
  * failed.
  *
index 600ce401518eba5dc620d3ddf14f92af481fd7b6..0baa38c5d0dd19a308fb8707792900ea5dfe5bc2 100644 (file)
@@ -36,7 +36,6 @@
       <module>mdsal-common-api</module>
     </modules>
 
-
   <!--
       Maven Site Configuration