Cleanup a few warnings
[yangtools.git] / yang / yang-data-transform / src / main / java / org / opendaylight / yangtools / transform / QNameTransformingStreamWriter.java
index 70925f1693dfedc12f69791f929121eaaaa8e035..0085ae061b15b78f830ce310b13a714d29a19efc 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.yangtools.transform;
 
 import com.google.common.base.Function;
-import com.google.common.base.Preconditions;
 import com.google.common.collect.ForwardingObject;
 import com.google.common.collect.ImmutableSet;
 import java.io.IOException;
@@ -54,7 +53,7 @@ public abstract class QNameTransformingStreamWriter extends ForwardingObject imp
             }
 
             @Override
-            protected QName transform(QName key) {
+            protected QName transform(final QName key) {
                 return transformation.apply(key);
             }
 
@@ -70,7 +69,7 @@ public abstract class QNameTransformingStreamWriter extends ForwardingObject imp
      * @param mapping Immutable map which represent mapping from original to new values.
      * @return decorator, which uses supplied mapping to transform QNames.
      */
-    public static NormalizedNodeStreamWriter createQNameReplacing(NormalizedNodeStreamWriter delegate,
+    public static NormalizedNodeStreamWriter createQNameReplacing(final NormalizedNodeStreamWriter delegate,
             final Map<QName, QName> mapping) {
         return fromFunction(delegate, new QNameReplacementFunction(mapping));
     }
@@ -84,7 +83,7 @@ public abstract class QNameTransformingStreamWriter extends ForwardingObject imp
      * @param mapping Immutable map which represent mapping from original to new values.
      * @return decorator, which uses supplied mapping to transform QNameModules.
      */
-    public static NormalizedNodeStreamWriter createQNameModuleReplacing(NormalizedNodeStreamWriter delegate,
+    public static NormalizedNodeStreamWriter createQNameModuleReplacing(final NormalizedNodeStreamWriter delegate,
             final Map<QNameModule, QNameModule> mapping) {
         return fromFunction(delegate, new QNameModuleReplacementFunction(mapping));
     }
@@ -92,7 +91,7 @@ public abstract class QNameTransformingStreamWriter extends ForwardingObject imp
     /**
      * Transforms a QName to new mapping.
      *
-     * NOTE: If QName should be unchanged implemention needs to return original QName.
+     * NOTE: If QName should be unchanged implementation needs to return original QName.
      *
      * @param key QName to transform.
      * @return Returns new value of QName.
@@ -100,64 +99,64 @@ public abstract class QNameTransformingStreamWriter extends ForwardingObject imp
     protected abstract @Nonnull QName transform(@Nonnull QName key);
 
     @Override
-    public void leafNode(NodeIdentifier name, Object value) throws IOException, IllegalArgumentException {
+    public void leafNode(final NodeIdentifier name, final Object value) throws IOException, IllegalArgumentException {
         delegate().leafNode(transform(name), value);
     }
 
     @Override
-    public void startLeafSet(NodeIdentifier name, int childSizeHint) throws IOException, IllegalArgumentException {
+    public void startLeafSet(final NodeIdentifier name, final int childSizeHint) throws IOException, IllegalArgumentException {
         delegate().startLeafSet(transform(name), childSizeHint);
     }
 
     @Override
-    public void leafSetEntryNode(Object value) throws IOException, IllegalArgumentException {
+    public void leafSetEntryNode(final Object value) throws IOException, IllegalArgumentException {
         delegate().leafSetEntryNode(value);
     }
 
     @Override
-    public void startContainerNode(NodeIdentifier name, int childSizeHint) throws IOException, IllegalArgumentException {
+    public void startContainerNode(final NodeIdentifier name, final int childSizeHint) throws IOException, IllegalArgumentException {
         delegate().startContainerNode(transform(name), childSizeHint);
     }
 
     @Override
-    public void startUnkeyedList(NodeIdentifier name, int childSizeHint) throws IOException, IllegalArgumentException {
+    public void startUnkeyedList(final NodeIdentifier name, final int childSizeHint) throws IOException, IllegalArgumentException {
         delegate().startUnkeyedList(transform(name), childSizeHint);
     }
 
     @Override
-    public void startUnkeyedListItem(NodeIdentifier name, int childSizeHint) throws IOException, IllegalStateException {
+    public void startUnkeyedListItem(final NodeIdentifier name, final int childSizeHint) throws IOException, IllegalStateException {
         delegate().startUnkeyedListItem(transform(name), childSizeHint);
     }
 
     @Override
-    public void startMapNode(NodeIdentifier name, int childSizeHint) throws IOException, IllegalArgumentException {
+    public void startMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException, IllegalArgumentException {
         delegate().startMapNode(transform(name), childSizeHint);
     }
 
     @Override
-    public void startMapEntryNode(NodeIdentifierWithPredicates identifier, int childSizeHint) throws IOException,
+    public void startMapEntryNode(final NodeIdentifierWithPredicates identifier, final int childSizeHint) throws IOException,
             IllegalArgumentException {
         delegate().startMapEntryNode(transform(identifier), childSizeHint);
     }
 
     @Override
-    public void startOrderedMapNode(NodeIdentifier name, int childSizeHint) throws IOException,
+    public void startOrderedMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException,
             IllegalArgumentException {
         delegate().startOrderedMapNode(transform(name), childSizeHint);
     }
 
     @Override
-    public void startChoiceNode(NodeIdentifier name, int childSizeHint) throws IOException, IllegalArgumentException {
+    public void startChoiceNode(final NodeIdentifier name, final int childSizeHint) throws IOException, IllegalArgumentException {
         delegate().startChoiceNode(transform(name), childSizeHint);
     }
 
     @Override
-    public void startAugmentationNode(AugmentationIdentifier identifier) throws IOException, IllegalArgumentException {
+    public void startAugmentationNode(final AugmentationIdentifier identifier) throws IOException, IllegalArgumentException {
         delegate().startAugmentationNode(transform(identifier));
     }
 
     @Override
-    public void anyxmlNode(NodeIdentifier name, Object value) throws IOException, IllegalArgumentException {
+    public void anyxmlNode(final NodeIdentifier name, final Object value) throws IOException, IllegalArgumentException {
         delegate().anyxmlNode(transform(name), value);
     }
 
@@ -176,11 +175,11 @@ public abstract class QNameTransformingStreamWriter extends ForwardingObject imp
         delegate().flush();
     }
 
-    private NodeIdentifier transform(NodeIdentifier name) {
+    private NodeIdentifier transform(final NodeIdentifier name) {
         return new NodeIdentifier(transform(name.getNodeType()));
     }
 
-    private AugmentationIdentifier transform(AugmentationIdentifier identifier) {
+    private AugmentationIdentifier transform(final AugmentationIdentifier identifier) {
         ImmutableSet.Builder<QName> builder = ImmutableSet.builder();
         for (QName original : identifier.getPossibleChildNames()) {
             builder.add(transform(original));
@@ -188,7 +187,7 @@ public abstract class QNameTransformingStreamWriter extends ForwardingObject imp
         return new AugmentationIdentifier(builder.build());
     }
 
-    private NodeIdentifierWithPredicates transform(NodeIdentifierWithPredicates identifier) {
+    private NodeIdentifierWithPredicates transform(final NodeIdentifierWithPredicates identifier) {
         Map<QName, Object> keyValues = new HashMap<>();
         for (Map.Entry<QName, Object> original : identifier.getKeyValues().entrySet()) {
             keyValues.put(transform(original.getKey()), original.getValue());