Fixed Checkstyle violation errors in mdsal-dom-api module 43/43343/12
authorjanab <brinda.jana@nexusis.com>
Mon, 8 Aug 2016 19:32:14 +0000 (12:32 -0700)
committerRobert Varga <rovarga@cisco.com>
Tue, 23 Aug 2016 13:18:21 +0000 (15:18 +0200)
Implemented code review comment. 2nd round code review comments are implemented.

Change-Id: Iaa93e0786c54d80aa8cba8289570dc281442a055
Signed-off-by: Brinda Jana <brinda.jana@nexusis.com>
Signed-off-by: Robert Varga <rovarga@cisco.com>
31 files changed:
dom/mdsal-dom-api/pom.xml
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataBroker.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeChangeListener.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeChangeService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeCommitCohort.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeCommitCohortRegistry.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeCursorAwareTransaction.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeIdentifier.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeInaccessibleException.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeListener.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeProducer.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeReadCursor.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeReadTransaction.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeShardingService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMDataTreeWriteTransaction.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMEvent.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMExtensibleService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMMountPoint.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMNotificationPublishService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMNotificationService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMRpcIdentifier.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMRpcImplementation.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMRpcImplementationNotAvailableException.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMRpcProviderService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMRpcService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMSchemaService.java
dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/DOMTransactionChain.java
dom/mdsal-dom-api/src/test/java/org/opendaylight/controller/md/sal/dom/api/AbstractDOMDataTreeServiceTestSuite.java
dom/mdsal-dom-api/src/test/java/org/opendaylight/mdsal/dom/api/DOMDataTreeIdentifierTest.java
dom/mdsal-dom-api/src/test/java/org/opendaylight/mdsal/dom/api/DOMExceptionsTest.java

index e3a3847d423c7db6c24603f0057956b809eb00ee..f6f085556f539b2554e2da2194b6ee0f845b112e 100644 (file)
         <artifactId>maven-bundle-plugin</artifactId>
         <extensions>true</extensions>
       </plugin>
+      <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <configuration>
+              <propertyExpansion>checkstyle.violationSeverity=warning</propertyExpansion>
+          </configuration>
+      </plugin>
     </plugins>
   </build>
   <scm>
index 2c406983c28a2017f97a8c6d5d773f660f674979..23c6efcf8cb10eec0f9a4fe715067b9413b41887 100644 (file)
@@ -5,44 +5,30 @@
  * 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.mdsal.dom.api;
 
 import org.opendaylight.mdsal.common.api.AsyncDataBroker;
 import org.opendaylight.mdsal.common.api.TransactionChainFactory;
 import org.opendaylight.mdsal.common.api.TransactionChainListener;
-
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
  * Data Broker which provides data transaction and data change listener functionality
- * using {@link NormalizedNode} data format.
- *
- * This interface is type capture of generic interfaces and returns type captures
- * of results for client-code convenience.
- *
+ * using {@link NormalizedNode} data format. This interface is type capture of generic
+ * interfaces and returns type captures of results for client-code convenience.
  */
 public interface DOMDataBroker extends
         AsyncDataBroker<YangInstanceIdentifier, NormalizedNode<?, ?>>,
         TransactionChainFactory<YangInstanceIdentifier, NormalizedNode<?, ?>>,
         DOMExtensibleService<DOMDataBroker, DOMDataBrokerExtension> {
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     DOMDataTreeReadTransaction newReadOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     DOMDataTreeWriteTransaction newWriteOnlyTransaction();
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     DOMTransactionChain createTransactionChain(TransactionChainListener listener);
 }
index 1e0812b158e147b7b2a01bbc77266094751cdc16..efe66b4b4a337ce75d3b1c6395a2666f6b311ed2 100644 (file)
@@ -31,7 +31,6 @@ public interface DOMDataTreeChangeListener extends EventListener {
      * and after compare as equal. Implementations of this interface are expected
      * to recover from such events. Event producers are expected to exert reasonable
      * effort to suppress such events.
-     *
      * In other words, it is completely acceptable to observe
      * a {@link org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode},
      * which reports a {@link org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType}
index bbe4da3cfae2f758a167e4687e4276285fa2abf2..e08892f1fb88ad427accf6d17edbf40ca8be1964 100644 (file)
@@ -18,13 +18,15 @@ public interface DOMDataTreeChangeService extends DOMDataBrokerExtension {
     /**
      * Registers a {@link DOMDataTreeChangeListener} to receive notifications when data changes
      * under a given path in the conceptual data tree.
+     *
      * <p>
      * You are able to register for notifications for any node or subtree which can be represented
      * using {@link DOMDataTreeIdentifier}.
-     * <p>
      *
+     * <p>
      * You are able to register for data change notifications for a subtree or leaf even if it does
      * not exist. You will receive notification once that node is created.
+     *
      * <p>
      * If there is any pre-existing data in the data tree for the path for which you are
      * registering, you will receive an initial data change event, which will contain all
@@ -33,6 +35,7 @@ public interface DOMDataTreeChangeService extends DOMDataBrokerExtension {
      * <p>
      * This method returns a {@link ListenerRegistration} object. To "unregister" your listener for
      * changes call the {@link ListenerRegistration#close()} method on the returned object.
+     *
      * <p>
      * You MUST explicitly unregister your listener when you no longer want to receive
      * notifications. This is especially true in OSGi environments, where failure to do so during
@@ -44,5 +47,6 @@ public interface DOMDataTreeChangeService extends DOMDataBrokerExtension {
      * @return Listener registration object, which may be used to unregister your listener using
      *         {@link ListenerRegistration#close()} to stop delivery of change events.
      */
-    @Nonnull <L extends DOMDataTreeChangeListener> ListenerRegistration<L> registerDataTreeChangeListener(@Nonnull DOMDataTreeIdentifier treeId, @Nonnull L listener);
+    @Nonnull <L extends DOMDataTreeChangeListener> ListenerRegistration<L>
+                          registerDataTreeChangeListener(@Nonnull DOMDataTreeIdentifier treeId, @Nonnull L listener);
 }
index 8bf594db4e40024cc32cc36ae6294120cf13cad2..251061d9f63c2f66c777b845cda7c883439721bc 100644 (file)
@@ -15,82 +15,61 @@ import org.opendaylight.mdsal.common.api.PostCanCommitStep;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 /**
- *
  * Commit cohort participating in commit of data modification, which can validate data tree
  * modifications, with option to reject supplied modification, and with callbacks describing state
  * of commit.
  *
  * <h2>Performance implications</h2>
- *
  * {@link DOMDataTreeCommitCohort}s are hooked up into commit of data tree changes and MAY
  * negatively affect performance of data broker / store.
- *
  * Implementations of this interface are discouraged, unless you really need ability to veto data
  * tree changes, or to provide external state change in sync with visibility of commited data.
  *
- *
  * <h2>Implementation requirements</h2>
- *
  * <h3>Correctness assumptions</h3> Implementation SHOULD use only {@link DOMDataTreeCandidate} and
  * provided {@link SchemaContext} for validation purposes.
- *
  * Use of any other external mutable state is discouraged, implementation MUST NOT use any
  * transaction related APIs on same data broker / data store instance during invocation of
  * callbacks, except ones provided as argument. Note that this MAY BE enforced by some
  * implementations of {@link DOMDataBroker} or DOMDataCommitCoordinator
- *
  * Note that this may be enforced by some implementations of {@link DOMDataTreeCommitCohortRegistry}
  * and such calls may fail.
- *
  * <h3>Correct model usage</h3> If implementation is performing YANG-model driven validation
  * implementation SHOULD use provided schema context.
- *
  * Any other instance of {@link SchemaContext} obtained by other means, may not be valid for
  * associated DOMDataTreeCandidate and it may lead to incorrect validation or processing of provided
  * data.
- *
  * <h3>DataTreeCandidate assumptions</h3> Implementation SHOULD NOT make any assumptions on
  * {@link DOMDataTreeCandidate} being successfully committed until associated
  * {@link PostCanCommitStep#preCommit()} and
  * {@link org.opendaylight.mdsal.common.api.PostPreCommitStep#commit()} callback was invoked.
- *
- *
  * <h2>Usage patterns</h2>
- *
  * <h3>Data Tree Validator</h3>
- *
  * Validator is implementation, which only validates {@link DOMDataTreeCandidate} and does not
  * retain any state derived from edited data - does not care if {@link DOMDataTreeCandidate} was
  * rejected afterwards or transaction was cancelled.
- *
  * Implementation may opt-out from receiving {@code preCommit()}, {@code commit()}, {@code abort()}
  * callbacks by returning {@link PostCanCommitStep#NOOP}.
  *
- * TODO: Provide example and describe more usage patterns
- *
- * @author Tony Tkacik &lt;ttkacik@cisco.com&gt;
- *
+ * <p>
+ * @author Tony Tkacik
  */
+// TODO: Provide example and describe more usage patterns
 @Beta
 public interface DOMDataTreeCommitCohort {
 
     /**
      * Validates supplied data tree candidate and associates cohort-specific steps with data broker
      * transaction.
-     *
      * If {@link DataValidationFailedException} is thrown by implementation, commit of supplied data
      * will be prevented, with the DataBroker transaction providing the thrown exception as the
      * cause of failure.
-     *
      * Note the implementations are expected to do validation and processing asynchronous.
-     *
      * Implementations SHOULD do processing fast, and are discouraged SHOULD NOT block on any
      * external resources.
-     *
      * Implementation MUST NOT access any data transaction related APIs during invocation of
      * callback. Note that this may be enforced by some implementations of
      * {@link DOMDataTreeCommitCohortRegistry} and such calls may fail.
-     *
      * Implementation MAY opt-out from implementing other steps by returning
      * {@link PostCanCommitStep#NOOP}. Otherwise implementation MUST return instance of
      * {@link PostCanCommitStep}, which will be used to invoke
index 63cba172b7da9fcbc097f8882bd3e3bfeacc9c0a..402376a561bdf43d79d750e49d154cab01854af3 100644 (file)
@@ -9,9 +9,7 @@
 package org.opendaylight.mdsal.dom.api;
 
 /**
- *
  * Commit Cohort registry for {@link DOMDataTreeWriteTransaction}.
- *
  * See {@link DOMDataTreeCommitCohort} for more details.
  *
  * @author Tony Tkacik &lt;ttkacik@cisco.com&gt;
index b4abfb2001895afd8a214ca0bcbea6e2c608068a..351dd7394e4d1bef565fe91c5d2a500497ff65d0 100644 (file)
@@ -5,7 +5,6 @@
  * 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.mdsal.dom.api;
 
 import com.google.common.util.concurrent.CheckedFuture;
@@ -27,18 +26,14 @@ public interface DOMDataTreeCursorAwareTransaction extends DOMDataTreeCursorProv
      * @return write cursor at the desired location.
      * @throws IllegalStateException when there's an open cursor, or this transaction is closed already.
      */
-    @Nullable
     @Override
-    DOMDataTreeWriteCursor createCursor(@Nonnull DOMDataTreeIdentifier path);
+    @Nullable DOMDataTreeWriteCursor createCursor(@Nonnull DOMDataTreeIdentifier path);
 
     /**
      * 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).
      *
@@ -51,20 +46,18 @@ public interface DOMDataTreeCursorAwareTransaction extends DOMDataTreeCursorProv
     /**
      * 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.
-     *
      * This call logically seals the transaction, which prevents the client from further changing
      * data tree using this transaction's cursor. Any subsequent calls to
      * <code>createCursorCursor(DOMDataTreeIdentifier</code>
      * or any of the cursor's methods will fail with {@link IllegalStateException}.
-     *
      * The transaction is marked as submitted and enqueued into the shard back-end for
      * processing.
      *
      * @return Checked future informing of success/failure
      */
-    CheckedFuture<Void,TransactionCommitFailedException> submit();
-
+    CheckedFuture<Void, TransactionCommitFailedException> submit();
 }
index c61722c5b43f5d3376abc914305b75ca11ab242e..d21eece43e91cccdefa5757fd984b4cf0fa3ab85 100644 (file)
@@ -5,16 +5,14 @@
  * 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.mdsal.dom.api;
 
-import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Preconditions;
 import java.io.Serializable;
 import java.util.Iterator;
 import javax.annotation.Nonnull;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.concepts.Path;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -24,12 +22,14 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum
  * A unique identifier for a particular subtree. It is composed of the logical
  * data store type and the instance identifier of the root node.
  */
-public final class DOMDataTreeIdentifier implements Immutable, Path<DOMDataTreeIdentifier>, Serializable, Comparable<DOMDataTreeIdentifier> {
+public final class DOMDataTreeIdentifier implements Immutable,
+    Path<DOMDataTreeIdentifier>, Serializable, Comparable<DOMDataTreeIdentifier> {
     private static final long serialVersionUID = 1L;
     private final YangInstanceIdentifier rootIdentifier;
     private final LogicalDatastoreType datastoreType;
 
-    public DOMDataTreeIdentifier(final LogicalDatastoreType datastoreType, final YangInstanceIdentifier rootIdentifier) {
+    public DOMDataTreeIdentifier(final LogicalDatastoreType datastoreType,
+            final YangInstanceIdentifier rootIdentifier) {
         this.datastoreType = Preconditions.checkNotNull(datastoreType);
         this.rootIdentifier = Preconditions.checkNotNull(rootIdentifier);
     }
@@ -82,29 +82,29 @@ public final class DOMDataTreeIdentifier implements Immutable, Path<DOMDataTreeI
     }
 
     @Override
-    public int compareTo(final DOMDataTreeIdentifier o) {
-        int i = datastoreType.compareTo(o.datastoreType);
-        if (i != 0) {
-            return i;
+    public int compareTo(final DOMDataTreeIdentifier domDataTreeIdentifier) {
+        int cmp = datastoreType.compareTo(domDataTreeIdentifier.datastoreType);
+        if (cmp != 0) {
+            return cmp;
         }
 
-        final Iterator<PathArgument> mi = rootIdentifier.getPathArguments().iterator();
-        final Iterator<PathArgument> oi = o.rootIdentifier.getPathArguments().iterator();
+        final Iterator<PathArgument> myIter = rootIdentifier.getPathArguments().iterator();
+        final Iterator<PathArgument> otherIter = domDataTreeIdentifier.rootIdentifier.getPathArguments().iterator();
 
-        while (mi.hasNext()) {
-            if (!oi.hasNext()) {
+        while (myIter.hasNext()) {
+            if (!otherIter.hasNext()) {
                 return 1;
             }
 
-            final PathArgument ma = mi.next();
-            final PathArgument oa = oi.next();
-            i = ma.compareTo(oa);
-            if (i != 0) {
-                return i;
+            final PathArgument myPathArg = myIter.next();
+            final PathArgument otherPathArg = otherIter.next();
+            cmp = myPathArg.compareTo(otherPathArg);
+            if (cmp != 0) {
+                return cmp;
             }
         }
 
-        return oi.hasNext() ? -1 : 0;
+        return otherIter.hasNext() ? -1 : 0;
     }
 
     @Override
index 6dd250663cc9dce9fbe9f40a6450b39000635cf7..85d82521460f92e80c6c89eb1bb5882ebf9ec73c 100644 (file)
@@ -22,7 +22,8 @@ public class DOMDataTreeInaccessibleException extends DOMDataTreeListeningExcept
         this.treeIdentifier = Preconditions.checkNotNull(treeIdentifier);
     }
 
-    public DOMDataTreeInaccessibleException(final DOMDataTreeIdentifier treeIdentifier, final String message, final Throwable cause) {
+    public DOMDataTreeInaccessibleException(final DOMDataTreeIdentifier treeIdentifier,
+            final String message, final Throwable cause) {
         super(message);
         this.treeIdentifier = Preconditions.checkNotNull(treeIdentifier);
     }
index 22de496972417db8701536ee610da920bef9376e..3c8edc1e3a4816f9623bb6f730bd2d14163ba77c 100644 (file)
@@ -29,7 +29,8 @@ public interface DOMDataTreeListener extends EventListener {
      *                 This includes all the subtrees this listener is subscribed to, even those
      *                 which have not changed.
      */
-    void onDataTreeChanged(@Nonnull Collection<DataTreeCandidate> changes, @Nonnull Map<DOMDataTreeIdentifier, NormalizedNode<?, ?>> subtrees);
+    void onDataTreeChanged(@Nonnull Collection<DataTreeCandidate> changes,
+            @Nonnull Map<DOMDataTreeIdentifier, NormalizedNode<?, ?>> subtrees);
 
     /**
      * Invoked when a subtree listening failure occurs. This can be triggered, for example, when a
index 7ff7d96487ddb66b53b16cff98e77bf44ff31679..f6aae1d1dbd95d261d9f1333621afccec12ee4c4 100644 (file)
@@ -16,21 +16,26 @@ import javax.annotation.Nonnull;
  * open. It needs to be either submitted or cancelled before another one can be open.
  * Once a transaction is submitted, it will proceed to be committed asynchronously.
  *
- * Each instance has  an upper bound on the number of transactions which can be in-flight,
+ * <p>
+ * Each instance has an upper bound on the number of transactions which can be in-flight,
  * once that capacity is exceeded, an attempt to create a new transaction will block
  * until some transactions complete.
  *
+ * <p>
  * Each {@link DOMDataTreeProducer} can be in two logical states, bound and unbound,
  * which define the lifecycle rules for when is it legal to create and submit transactions
  * in relationship with {@link DOMDataTreeListener} callbacks.
  *
+ * <p>
  * When a producer is first created, it is unbound. In this state the producer can be
  * accessed by any application thread to allocate or submit transactions, as long as
  * the 'single open transaction' rule is maintained. The producer and any transaction
  * object MUST NOT be accessed, directly or indirectly, from a {@link DOMDataTreeListener}
  * callback.
  *
- * When a producer is referenced in a call to {@link DOMDataTreeService#registerListener(DOMDataTreeListener, java.util.Collection, boolean, java.util.Collection)},
+ * <p>
+ * When a producer is referenced in a call to {@link DOMDataTreeService#registerListener(DOMDataTreeListener,
+ * Collection, boolean, Collection)},
  * an attempt will be made to bind the producer to the specified {@link DOMDataTreeListener}.
  * Such an attempt will fail the producer is already bound, or it has an open transaction.
  * Once bound, the producer can only be accessed from within the {@link DOMDataTreeListener}
@@ -57,17 +62,18 @@ public interface DOMDataTreeProducer extends DOMDataTreeProducerFactory, AutoClo
     @Nonnull DOMDataTreeCursorAwareTransaction createTransaction(boolean isolated);
 
     /**
-     * {@inheritDoc}
+     * {@inheritDoc}.
      *
+     * <p>
      * When invoked on a {@link DOMDataTreeProducer}, this method has additional restrictions. There
      * may not be an open transaction from this producer. The method needs to be invoked in
      * appropriate context, e.g. bound or unbound.
      *
+     * <p>
      * Specified subtrees must be accessible by this producer. Accessible means they are a subset of
      * the subtrees specified when the producer is instantiated. The set is further reduced as child
      * producers are instantiated -- if you create a producer for /a and then a child for /a/b, /a/b
      * is not accessible from the first producer.
-     *
      * Once this method returns successfully, this (parent) producer loses the ability to access the
      * specified paths until the resulting (child) producer is shut down.
      *
@@ -83,7 +89,7 @@ public interface DOMDataTreeProducer extends DOMDataTreeProducerFactory, AutoClo
     @Nonnull DOMDataTreeProducer createProducer(@Nonnull Collection<DOMDataTreeIdentifier> subtrees);
 
     /**
-     * {@inheritDoc}
+     * {@inheritDoc}.
      *
      * @throws DOMDataTreeProducerBusyException when there is an open transaction.
      */
index 0664838588cb7b354a8d6f7de173d90d61399f86..b675f719175f28f177bc0ad50659bd23c3f97628 100644 (file)
@@ -27,8 +27,8 @@ public interface DOMDataTreeReadCursor extends DOMDataTreeCursor {
 
     /**
      * Checks if data is available in the logical data store located at provided path.
-     * <p>
      *
+     * <p>
      * Note: a successful result from this method makes no guarantee that a subsequent call to
      * {@link #readNode(PathArgument)} will succeed. It is possible that the data resides in a data store on a remote
      * node and, if that node goes down or a network failure occurs, a subsequent read would fail.
index bdd6629b3f2aea0e6012c20031546b0dc6ad7206..1840f2113c491bf40db80c49d0b2626d8a62c505 100644 (file)
@@ -17,6 +17,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
  * A transaction that provides read access to a logical data store.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncReadTransaction}.
  */
@@ -24,6 +25,7 @@ public interface DOMDataTreeReadTransaction extends AsyncReadTransaction<YangIns
 
     /**
      * Reads data from provided logical data store located at the provided path.
+     *
      *<p>
      * If the target is a subtree, then the whole subtree is read (and will be
      * accessible from the returned data object).
@@ -49,8 +51,8 @@ public interface DOMDataTreeReadTransaction extends AsyncReadTransaction<YangIns
 
     /**
      * Checks if data is available in the logical data store located at provided path.
-     * <p>
      *
+     * <p>
      * Note: a successful result from this method makes no guarantee that a subsequent call to {@link #read}
      * will succeed. It is possible that the data resides in a data store on a remote node and, if that
      * node goes down or a network failure occurs, a subsequent read would fail. Another scenario is if
index 1a7ae4c0f7e70385fccc86256584ba51306042b2..1934f870ddef77bcbb45f06fa71351b700066a5f 100644 (file)
@@ -16,10 +16,12 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
  * with the data tree are split into data producers and consumers (listeners). Each
  * of them operate on a set of subtrees, which need to be declared at instantiation time.
  *
+ * <p>
  * Returned instances are not thread-safe and expected to be used by a single thread
  * at a time. Furthermore, producers may not be accessed from consumer callbacks
  * unless they were specified when the listener is registered.
  *
+ * <p>
  * The service maintains a loop-free topology of producers and consumers. What this means
  * is that a consumer is not allowed to access a producer, which affects any of the
  * subtrees it is subscribed to. This restriction is in place to ensure the system does
@@ -35,12 +37,14 @@ public interface DOMDataTreeService extends DOMDataTreeProducerFactory, DOMServi
      * is free to merge the changes, so that a smaller number of them will be reported,
      * possibly hiding some data transitions (like flaps).
      *
+     * <p>
      * If the listener wants to write into any producer, that producer has to be mentioned
      * in the call to this method. Those producers will be bound exclusively to the
      * registration, so that accessing them outside of this listener's callback will trigger
      * an error. Any producers mentioned must be idle, e.g. they may not have an open
      * transaction at the time this method is invoked.
      *
+     * <p>
      * Each listener instance can be registered at most once. Implementations of this
      * interface have to guarantee that the listener's methods will not be invoked
      * concurrently from multiple threads.
index 116561cb2f217ec4c5f8b9e53d3744f446c55e3d..4a4255c4f268816a515451d79bf452a02e402c19 100644 (file)
@@ -16,11 +16,13 @@ import org.opendaylight.yangtools.concepts.ListenerRegistration;
  * single {@link DOMDataTreeIdentifier}. Based on those data tree identifiers, the
  * shards are organized in a tree, where there is a logical parent/child relationship.
  *
+ * <p>
  * It is not allowed to attach two shards to the same data tree identifier, which means
  * the mapping of each piece of information has an unambiguous home. When accessing
  * the information, the shard with the longest matching data tree identifier is used,
  * which is why this interface treats it is a prefix.
  *
+ * <p>
  * Whenever a parent/child relationship is changed, the parent is notified, so it can
  * understand that a logical child has been attached.
  */
@@ -35,5 +37,6 @@ public interface DOMDataTreeShardingService extends DOMService {
      * @throws DOMDataTreeShardingConflictException if the prefix is already bound
      */
     @Nonnull <T extends DOMDataTreeShard> ListenerRegistration<T> registerDataTreeShard(
-            @Nonnull DOMDataTreeIdentifier prefix, @Nonnull T shard, @Nonnull DOMDataTreeProducer producer) throws DOMDataTreeShardingConflictException;
+            @Nonnull DOMDataTreeIdentifier prefix, @Nonnull T shard,
+            @Nonnull DOMDataTreeProducer producer) throws DOMDataTreeShardingConflictException;
 }
index 67a12dc6b74d3d92825c42ad4dd7f00e8dc72e80..d500782b1931832c5fb4e172ed22572c28ff18e4 100644 (file)
@@ -9,22 +9,25 @@ package org.opendaylight.mdsal.dom.api;
 
 import org.opendaylight.mdsal.common.api.AsyncWriteTransaction;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
  * A transaction that provides mutation capabilities on a data tree.
+ *
  * <p>
  * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
  */
-public interface DOMDataTreeWriteTransaction extends AsyncWriteTransaction<YangInstanceIdentifier, NormalizedNode<?, ?>> {
+public interface DOMDataTreeWriteTransaction extends
+    AsyncWriteTransaction<YangInstanceIdentifier, NormalizedNode<?, ?>> {
 
     /**
      * Stores a piece of data at the specified path. This acts as an add / replace
      * operation, which is to say that whole subtree will be replaced by the specified data.
+     *
      * <p>
      * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
+     *
      * <p>
      * If you need to make sure that a parent object exists but you do not want modify
      * its pre-existing state by using put, consider using {@link #merge} instead.
@@ -44,8 +47,10 @@ public interface DOMDataTreeWriteTransaction extends AsyncWriteTransaction<YangI
      * 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>
      * For more information on usage and examples, please see the documentation in {@link AsyncWriteTransaction}.
+     *
      *<p>
      * If you require an explicit replace operation, use {@link #put} instead.
      *
@@ -60,9 +65,7 @@ public interface DOMDataTreeWriteTransaction extends AsyncWriteTransaction<YangI
      */
     void merge(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?, ?> data);
 
-    /**
-     * {@inheritDoc}
-     */
+
     @Override
-    public void delete(LogicalDatastoreType store, YangInstanceIdentifier path);
+    void delete(LogicalDatastoreType store, YangInstanceIdentifier path);
 }
index 33eb4aa8ee6bfbc20c67bd8f7fe474e3c5566410..285000a87ac614caba72a802babcd57e283e34c6 100644 (file)
@@ -11,12 +11,12 @@ package org.opendaylight.mdsal.dom.api;
 import java.util.Date;
 
 /**
- * Generic event interface
+ * Generic event interface.
  */
 public interface DOMEvent {
 
     /**
-     * Get the time of the event occurrence
+     * Get the time of the event occurrence.
      *
      * @return the event time
      */
index 289e1b935a5375eda6feff8e78adf1b4d006f3bd..cc52a5844a5d440cbf370995cc6ee513adc87d40 100644 (file)
@@ -19,7 +19,8 @@ import javax.annotation.Nonnull;
  * @param <E> Extension type
  */
 @Beta
-public interface DOMExtensibleService<T extends DOMExtensibleService<T, E>, E extends DOMServiceExtension<T, E>> extends DOMService {
+public interface DOMExtensibleService<T extends DOMExtensibleService<T, E>,
+    E extends DOMServiceExtension<T, E>> extends DOMService {
     /**
      * Return a map of currently-supported extensions, along with accessor services
      * which provide access to the specific functionality bound to this service.
index 08801c3b2d563f3f21375b2c448411a8bd38d231..d9af3d5758b6c73586c4d24552bd2c2cc57ff140 100644 (file)
@@ -5,13 +5,11 @@
  * 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.mdsal.dom.api;
 
+import com.google.common.base.Optional;
 import org.opendaylight.yangtools.concepts.Identifiable;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-
-import com.google.common.base.Optional;
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 public interface DOMMountPoint extends Identifiable<YangInstanceIdentifier> {
index 03332d4837a6c70023b161baf4b76326643ab86e..a55edb3db40d0a9d2af30a465c0e59f71f301cd4 100644 (file)
@@ -28,32 +28,29 @@ public interface DOMNotificationPublishService extends DOMService {
      * Well-known value indicating that the implementation is currently not
      * able to accept a notification.
      */
-    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(new DOMNotificationRejectedException("Unacceptable blocking conditions encountered"));
+    ListenableFuture<Object> REJECTED = Futures.immediateFailedFuture(
+        new DOMNotificationRejectedException("Unacceptable blocking conditions encountered"));
 
     /**
      * Publish a notification. The result of this method is a {@link ListenableFuture} which will
      * complete once the notification has been delivered to all immediate registrants. The type of
      * the object resulting from the future is not defined and implementations may use it to convey
      * additional information related to the publishing process.
-     *
      * Abstract subclasses can refine the return type as returning a promise of a more specific
      * type, e.g.:
-     *
      * public interface DeliveryStatus { int getListenerCount(); } ListenableFuture&lt;? extends
      * DeliveryStatus&gt;[ putNotification(DOMNotification notification);
-     *
      * Once the Future succeeds, the resulting object can be queried for traits using instanceof,
      * e.g:
-     *
      * // Can block when (for example) the implemention's ThreadPool queue is full Object o =
      * service.putNotification(notif).get(); if (o instanceof DeliveryStatus) { DeliveryStatus ds =
      * (DeliveryStatus)o; LOG.debug("Notification was received by {} listeners",
      * ds.getListenerCount();); } }
-     *
      * In case an implementation is running out of resources, it can block the calling thread until
      * enough resources become available to accept the notification for processing, or it is
      * interrupted.
      *
+     * <p>
      * Caution: completion here means that the implementation has completed processing of the
      * notification. This does not mean that all existing registrants have seen the notification.
      * Most importantly, the delivery process at other cluster nodes may have not begun yet.
@@ -64,7 +61,8 @@ public interface DOMNotificationPublishService extends DOMService {
      * @throws InterruptedException if interrupted while waiting
      * @throws NullPointerException if notification is null.
      */
-    @Nonnull ListenableFuture<? extends Object> putNotification(@Nonnull DOMNotification notification) throws InterruptedException;
+    @Nonnull ListenableFuture<? extends Object> putNotification(@Nonnull DOMNotification notification)
+            throws InterruptedException;
 
     /**
      * Attempt to publish a notification. The result of this method is a {@link ListenableFuture}
index 967721100066a6c6c0867ce082156ab9c5a85d78..4160d90c65e8aa785daf5253891964eba22e3fac 100644 (file)
@@ -31,7 +31,8 @@ public interface DOMNotificationService extends DOMService {
      *         null or a SchemaPath which does not represent a valid {@link DOMNotification} type.
      * @throws NullPointerException if either of the arguments is null
      */
-    <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(@Nonnull T listener, @Nonnull Collection<SchemaPath> types);
+    <T extends DOMNotificationListener> ListenerRegistration<T>
+            registerNotificationListener(@Nonnull T listener, @Nonnull Collection<SchemaPath> types);
 
     /**
      * Register a {@link DOMNotificationListener} to receive a set of notifications. As with other
@@ -48,5 +49,6 @@ public interface DOMNotificationService extends DOMService {
      * @throws NullPointerException if listener is null
      */
     // FIXME: Java 8: provide a default implementation of this method.
-    <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(@Nonnull T listener, SchemaPath... types);
+    <T extends DOMNotificationListener> ListenerRegistration<T>
+            registerNotificationListener(@Nonnull T listener, SchemaPath... types);
 }
index 2c948e66bdac4243be1b241385cea818dd8a1ee8..c5e4fce87c7f5ab5a7408356e5d610213fb0d5dd 100644 (file)
@@ -9,12 +9,10 @@ package org.opendaylight.mdsal.dom.api;
 
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Preconditions;
-import java.util.Collections;
 import java.util.Objects;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 
 /**
@@ -24,9 +22,6 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
  * contexts concurrently.
  */
 public abstract class DOMRpcIdentifier {
-
-    private static final YangInstanceIdentifier GLOBAL_CONTEXT = YangInstanceIdentifier.create(Collections.<PathArgument>emptySet());
-
     private static final class Global extends DOMRpcIdentifier {
         private Global(final @Nonnull SchemaPath type) {
             super(type);
@@ -34,7 +29,7 @@ public abstract class DOMRpcIdentifier {
 
         @Override
         public YangInstanceIdentifier getContextReference() {
-            return GLOBAL_CONTEXT;
+            return YangInstanceIdentifier.EMPTY;
         }
     }
 
@@ -75,8 +70,9 @@ public abstract class DOMRpcIdentifier {
      * @param contextReference Context reference, null means a global RPC identifier.
      * @return A global RPC identifier, guaranteed to be non-null.
      */
-    public static @Nonnull DOMRpcIdentifier create(final @Nonnull SchemaPath type, final @Nullable YangInstanceIdentifier contextReference) {
-        if (contextReference == null || GLOBAL_CONTEXT.equals(contextReference)) {
+    public static @Nonnull DOMRpcIdentifier create(final @Nonnull SchemaPath type,
+            final @Nullable YangInstanceIdentifier contextReference) {
+        if (contextReference == null || contextReference.isEmpty()) {
             return new Global(type);
         } else {
             return new Local(type, contextReference);
@@ -125,6 +121,7 @@ public abstract class DOMRpcIdentifier {
 
     @Override
     public final String toString() {
-        return MoreObjects.toStringHelper(this).omitNullValues().add("type", type).add("contextReference", getContextReference()).toString();
+        return MoreObjects.toStringHelper(this).omitNullValues().add("type", type).add("contextReference",
+                getContextReference()).toString();
     }
 }
index 2710f59f4dce98868496c640cf3e9fda1810614f..9bb5150467898df0fda4466df31ea6005259c804 100644 (file)
@@ -27,5 +27,6 @@ public interface DOMRpcImplementation {
      *         or report a subclass of {@link DOMRpcException} reporting a transport
      *         error.
      */
-    @Nonnull CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull DOMRpcIdentifier rpc, @Nullable NormalizedNode<?, ?> input);
+    @Nonnull CheckedFuture<DOMRpcResult, DOMRpcException>
+        invokeRpc(@Nonnull DOMRpcIdentifier rpc, @Nullable NormalizedNode<?, ?> input);
 }
index 5fa076284b24eee1c9f24030127d28022c461dbc..22f51166876f4e26f556cc144d40ab91bc975ecf 100644 (file)
@@ -20,7 +20,8 @@ public class DOMRpcImplementationNotAvailableException extends DOMRpcException {
         super(String.format(format, args));
     }
 
-    public DOMRpcImplementationNotAvailableException(@Nonnull final Throwable cause, @Nonnull final String format, final Object... args) {
+    public DOMRpcImplementationNotAvailableException(@Nonnull final Throwable cause,
+            @Nonnull final String format, final Object... args) {
         super(String.format(format, args), Preconditions.checkNotNull(cause));
     }
 }
index cac18791456f7e893fdb6e872277f3cd740ba926..9edc47f9f159f523bf29dd1d40101bbf98fd600d 100644 (file)
@@ -25,7 +25,8 @@ public interface DOMRpcProviderService extends DOMService {
      * @throws NullPointerException if implementation or types is null
      * @throws IllegalArgumentException if types is empty or contains a null element.
      */
-    @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(@Nonnull T implementation, @Nonnull DOMRpcIdentifier... rpcs);
+    @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T>
+        registerRpcImplementation(@Nonnull T implementation, @Nonnull DOMRpcIdentifier... rpcs);
 
     /**
      * Register an {@link DOMRpcImplementation} object with this service.
@@ -36,5 +37,6 @@ public interface DOMRpcProviderService extends DOMService {
      * @throws NullPointerException if implementation or types is null
      * @throws IllegalArgumentException if types is empty or contains a null element.
      */
-    @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(@Nonnull T implementation, @Nonnull Set<DOMRpcIdentifier> rpcs);
+    @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T>
+        registerRpcImplementation(@Nonnull T implementation, @Nonnull Set<DOMRpcIdentifier> rpcs);
 }
index 935c23b32c15370e61a0488ebcfe241c17f78cc6..a977ece8e235df64c451262238fe68719b34ec0b 100644 (file)
@@ -31,13 +31,13 @@ public interface DOMRpcService extends DOMService {
      *         or report a subclass of {@link DOMRpcException} reporting a transport
      *         error.
      */
-    @Nonnull CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(@Nonnull SchemaPath type, @Nullable NormalizedNode<?, ?> input);
+    @Nonnull CheckedFuture<DOMRpcResult, DOMRpcException>
+        invokeRpc(@Nonnull SchemaPath type, @Nullable NormalizedNode<?, ?> input);
 
     /**
      * Register a {@link DOMRpcAvailabilityListener} with this service to receive notifications
      * about RPC implementations becoming (un)available. The listener will be invoked with the
      * current implementations reported and will be kept uptodate as implementations come and go.
-     *
      * Users should note that using a listener does not necessarily mean that
      * {@link #invokeRpc(SchemaPath, NormalizedNode)} will not report a failure due to
      * {@link DOMRpcImplementationNotAvailableException} and need to be ready to handle it.
index b6946c9552c86bcf7e45eff426a04e7d0fe62d81..6e733bc7ec68a40a5a938fef5c163ecec38c1131 100644 (file)
@@ -14,15 +14,16 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
 public interface DOMSchemaService extends DOMService {
 
     /**
-     * Returns session specific YANG schema context
-     * @return
+     * Returns session specific YANG schema context.
+     *
+     * @return schemaContext
      */
     SchemaContext getSessionContext();
 
     /**
-     * Returns global schema context
+     * Returns global schema context.
      *
-     * @return
+     * @return schemaContext
      */
     SchemaContext getGlobalContext();
 
index c26f0cac5e0ec974cc3732dd55063e25c476c81c..14d7929b958818e0ce3ed8c72f12e3c88fd1aef2 100644 (file)
@@ -8,13 +8,11 @@
 package org.opendaylight.mdsal.dom.api;
 
 import org.opendaylight.mdsal.common.api.TransactionChain;
-
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
 /**
  * A chain of DOM Data transactions.
- *
  * Transactions in a chain need to be committed in sequence and each
  * transaction should see the effects of previous transactions as if they happened. A chain
  * makes no guarantees of atomicity, in fact transactions are committed as soon as possible.
index 979cc533b086861d371fe67ea564c50ef47b602b..a6df9c00fb68349a89081634e4e085a6c95aec55 100644 (file)
@@ -9,22 +9,19 @@ package org.opendaylight.controller.md.sal.dom.api;
 
 import static org.junit.Assert.assertNotNull;
 
+import com.google.common.util.concurrent.CheckedFuture;
+import java.net.URI;
+import java.util.Collections;
+import javax.annotation.Nonnull;
+import org.junit.Test;
 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
 import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
-
-import org.opendaylight.mdsal.dom.api.DOMDataTreeCursor;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeCursorAwareTransaction;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeProducer;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeProducerException;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeService;
 import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor;
-import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteTransaction;
-import com.google.common.util.concurrent.CheckedFuture;
-import java.net.URI;
-import java.util.Collections;
-import javax.annotation.Nonnull;
-import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -36,12 +33,14 @@ import org.opendaylight.yangtools.yang.data.impl.schema.builder.impl.ImmutableCo
  * can be used.
  */
 public abstract class AbstractDOMDataTreeServiceTestSuite {
-    protected static final QNameModule TEST_MODULE = QNameModule.create(URI.create("urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:store"), null);
+    protected static final QNameModule TEST_MODULE =
+            QNameModule.create(URI.create("urn:opendaylight:params:xml:ns:yang:controller:md:sal:test:store"), null);
 
     protected static final YangInstanceIdentifier UNORDERED_CONTAINER_IID = YangInstanceIdentifier.create(
         new NodeIdentifier(QName.create(TEST_MODULE, "lists")),
         new NodeIdentifier(QName.create(TEST_MODULE, "unordered-container")));
-    protected static final DOMDataTreeIdentifier UNORDERED_CONTAINER_TREE = new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL, UNORDERED_CONTAINER_IID);
+    protected static final DOMDataTreeIdentifier UNORDERED_CONTAINER_TREE
+        = new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL, UNORDERED_CONTAINER_IID);
 
     /**
      * Return a reference to the service used in this test. The instance
@@ -55,20 +54,23 @@ public abstract class AbstractDOMDataTreeServiceTestSuite {
     /**
      * A simple unbound producer. It write some basic things into the data store based on the
      * test model.
-     * @throws DOMDataTreeProducerException
-     * @throws TransactionCommitFailedException
+     *
+     * @throws DOMDataTreeProducerException when this exceptional condition happens
+     * @throws TransactionCommitFailedException when transaction commit fails
      */
-
     @Test
     public final void testBasicProducer() throws DOMDataTreeProducerException, TransactionCommitFailedException {
         // Create a producer. It is an AutoCloseable resource, hence the try-with pattern
-        try (final DOMDataTreeProducer prod = service().createProducer(Collections.singleton(UNORDERED_CONTAINER_TREE))) {
+        try (final DOMDataTreeProducer prod =
+                service().createProducer(Collections.singleton(UNORDERED_CONTAINER_TREE))) {
             assertNotNull(prod);
 
             final DOMDataTreeCursorAwareTransaction tx = prod.createTransaction(true);
             assertNotNull(tx);
 
-            final DOMDataTreeWriteCursor cursor = tx.createCursor(new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL, UNORDERED_CONTAINER_IID));
+            final DOMDataTreeWriteCursor cursor =
+                    tx.createCursor(new DOMDataTreeIdentifier(
+                            LogicalDatastoreType.OPERATIONAL, UNORDERED_CONTAINER_IID));
             assertNotNull(cursor);
             cursor.write(UNORDERED_CONTAINER_IID.getLastPathArgument(), ImmutableContainerNodeBuilder.create().build());
             cursor.close();
index c2b28e4fa6f9cb75c8b611ace440ebda3ca386f4..70e3dc21076762106fec1e6744ff68b37f60312d 100644 (file)
@@ -33,8 +33,8 @@ public class DOMDataTreeIdentifierTest {
             new YangInstanceIdentifier.NodeIdentifier(QName.create(TEST_MODULE, TEST_LISTS)));
     private static final DOMDataTreeIdentifier REF_TREE = new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL,
             REF_YII_IID);
-    private static final DOMDataTreeIdentifier TEST_DIFF_TREE = new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL,
-            TEST_YII_IID);
+    private static final DOMDataTreeIdentifier
+        TEST_DIFF_TREE = new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL,TEST_YII_IID);
 
     @Test
     public void constructTest() {
@@ -62,7 +62,8 @@ public class DOMDataTreeIdentifierTest {
     public void equalsTest() {
         assertTrue("Equals same", REF_TREE.equals(new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL,
                 REF_YII_IID)));
-        assertFalse("Different DataStoreType", REF_TREE.equals(new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION,
+        assertFalse("Different DataStoreType", REF_TREE.equals(
+                new DOMDataTreeIdentifier(LogicalDatastoreType.CONFIGURATION,
                 REF_YII_IID)));
         assertTrue("Equals same instance", REF_TREE.equals(REF_TREE));
         assertFalse("Different object", REF_TREE.equals(new Object()));
@@ -76,7 +77,8 @@ public class DOMDataTreeIdentifierTest {
         final YangInstanceIdentifier compareSecondIid = YangInstanceIdentifier.create(
                 new YangInstanceIdentifier.NodeIdentifier(QName.create(TEST_MODULE, COMPARE_SECOND_LISTS)));
 
-        assertEquals("Compare same to same", REF_TREE.compareTo(new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL,
+        assertEquals("Compare same to same", REF_TREE.compareTo(
+                new DOMDataTreeIdentifier(LogicalDatastoreType.OPERATIONAL,
                 REF_YII_IID)), 0);
         assertNotEquals("Compare same to same with different datastore", REF_TREE.compareTo(new DOMDataTreeIdentifier(
                 LogicalDatastoreType.CONFIGURATION, REF_YII_IID)), 0);
@@ -107,4 +109,4 @@ public class DOMDataTreeIdentifierTest {
         assertTrue("ToString", REF_TREE.toString().contains(REF_TREE.getRootIdentifier().toString()) && REF_TREE
                 .toString().contains(REF_TREE.getDatastoreType().toString()));
     }
-}
\ No newline at end of file
+}
index 3c8bd7533ef28e5dc4babef2d5743e0e4c9929f7..f220e583c280110ca724d4e70331e29c58c81012 100644 (file)
@@ -29,7 +29,7 @@ public class DOMExceptionsTest {
             TEST_YI_ID);
 
     @Test(expected = DOMDataTreeInaccessibleException.class)
-    public void DOMDataTreeInaccessibleExceptionTest() throws Exception {
+    public void testDomDataTreeInaccessibleException() throws Exception {
         final DOMDataTreeInaccessibleException testExc = new DOMDataTreeInaccessibleException(TEST_TREE, TEST_MESSAGE);
         assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
         assertNotNull(testExc.getTreeIdentifier());
@@ -39,7 +39,7 @@ public class DOMExceptionsTest {
     }
 
     @Test(expected = DOMDataTreeListeningException.class)
-    public void DOMDataTreeListeningExceptionTest() throws Exception {
+    public void testDomDataTreeListeningException() throws Exception {
         final DOMDataTreeListeningException testExc = new DOMDataTreeListeningException(TEST_MESSAGE);
         assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
 
@@ -47,7 +47,7 @@ public class DOMExceptionsTest {
     }
 
     @Test(expected = DOMDataTreeLoopException.class)
-    public void DOMDataTreeLoopExceptionTest() throws Exception {
+    public void testDomDataTreeLoopException() throws Exception {
         final DOMDataTreeLoopException testExc = new DOMDataTreeLoopException(TEST_MESSAGE);
         assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
 
@@ -55,7 +55,7 @@ public class DOMExceptionsTest {
     }
 
     @Test(expected = DOMDataTreeProducerBusyException.class)
-    public void DOMDataTreeProducerBusyExceptionTest() throws Exception {
+    public void testDomDataTreeProducerBusyException() throws Exception {
         final DOMDataTreeProducerBusyException testExc = new DOMDataTreeProducerBusyException(TEST_MESSAGE);
         assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
 
@@ -63,7 +63,7 @@ public class DOMExceptionsTest {
     }
 
     @Test(expected = DOMDataTreeProducerException.class)
-    public void DOMDataTreeProducerExceptionTest() throws Exception {
+    public void testDOMDataTreeProducerException() throws Exception {
         final DOMDataTreeProducerException testExc = new DOMDataTreeProducerException(TEST_MESSAGE);
         assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
 
@@ -71,7 +71,7 @@ public class DOMExceptionsTest {
     }
 
     @Test(expected = DOMDataTreeShardingConflictException.class)
-    public void DOMDataTreeShardingConflictExceptionTest() throws Exception {
+    public void testDOMDataTreeShardingConflictException() throws Exception {
         final DOMDataTreeShardingConflictException testExc = new DOMDataTreeShardingConflictException(TEST_MESSAGE);
         assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
 
@@ -79,7 +79,7 @@ public class DOMExceptionsTest {
     }
 
     @Test(expected = DOMNotificationRejectedException.class)
-    public void DOMNotificationRejectedExceptionTest() throws Exception {
+    public void testDomNotificationRejectedException() throws Exception {
         final DOMNotificationRejectedException testExc = new DOMNotificationRejectedException(TEST_MESSAGE);
         assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
 
@@ -87,9 +87,10 @@ public class DOMExceptionsTest {
     }
 
     @Test(expected = DOMRpcImplementationNotAvailableException.class)
-    public void DOMRpcImplementationNotAvailableExceptionTest() throws Exception {
-        final DOMRpcImplementationNotAvailableException testExc = new DOMRpcImplementationNotAvailableException(TEST_MESSAGE);
-        assertTrue(testExc.getMessage().contains(TEST_MESSAGE));
+    public void testDomRpcImplementationNotAvailableException() throws Exception {
+        final DOMRpcImplementationNotAvailableException dompcImplementationNotAvailableException
+            = new DOMRpcImplementationNotAvailableException(TEST_MESSAGE);
+        assertTrue(dompcImplementationNotAvailableException.getMessage().contains(TEST_MESSAGE));
 
         throw new DOMRpcImplementationNotAvailableException(new Throwable(), TEST_MESSAGE, new Object());
     }