Fix checkstyle issues in module sal-dom-broker
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / md / sal / dom / broker / impl / AbstractDOMForwardedCompositeTransaction.java
index 03f77c3eddfcbd632179351c69ced5b0aec98898..ad2b2f0ac6f6bb7a20d33a69ce3339333d38e1ae 100644 (file)
@@ -1,14 +1,16 @@
 /*
  * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ *
  * This program and the accompanying materials are made available under the
  * 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.controller.md.sal.dom.broker.impl;
 
 import com.google.common.base.Preconditions;
-import com.google.common.collect.ImmutableMap;
 import java.util.Collection;
+import java.util.Map;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction;
 import org.opendaylight.controller.sal.core.spi.data.DOMStoreTransaction;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
@@ -17,6 +19,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 /**
  * Composite DOM Transaction backed by {@link DOMStoreTransaction}.
  *
+ * <p>
  * Abstract base for composite transaction, which provides access only to common
  * functionality as retrieval of subtransaction, close method and retrieval of
  * identifier.
@@ -29,11 +32,10 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 abstract class AbstractDOMForwardedCompositeTransaction<K, T extends DOMStoreTransaction> implements
         AsyncTransaction<YangInstanceIdentifier, NormalizedNode<?, ?>> {
 
-    private final ImmutableMap<K, T> backingTxs;
+    private final Map<K, T> backingTxs;
     private final Object identifier;
 
     /**
-     *
      * Creates new composite Transactions.
      *
      * @param identifier
@@ -41,7 +43,7 @@ abstract class AbstractDOMForwardedCompositeTransaction<K, T extends DOMStoreTra
      * @param backingTxs
      *            Key,value map of backing transactions.
      */
-    protected AbstractDOMForwardedCompositeTransaction(final Object identifier, final ImmutableMap<K, T> backingTxs) {
+    protected AbstractDOMForwardedCompositeTransaction(final Object identifier, final Map<K, T> backingTxs) {
         this.identifier = Preconditions.checkNotNull(identifier, "Identifier should not be null");
         this.backingTxs = Preconditions.checkNotNull(backingTxs, "Backing transactions should not be null");
     }
@@ -49,8 +51,8 @@ abstract class AbstractDOMForwardedCompositeTransaction<K, T extends DOMStoreTra
     /**
      * Returns subtransaction associated with supplied key.
      *
-     * @param key
-     * @return
+     * @param key key
+     * @return subtransaction
      * @throws NullPointerException
      *             if key is null
      * @throws IllegalArgumentException
@@ -77,6 +79,7 @@ abstract class AbstractDOMForwardedCompositeTransaction<K, T extends DOMStoreTra
         return identifier;
     }
 
+    @SuppressWarnings("checkstyle:IllegalCatch")
     protected void closeSubtransactions() {
         /*
          * We share one exception for all failures, which are added