Remove explicit final keywords 09/10509/2
authorRobert Varga <rovarga@cisco.com>
Fri, 29 Aug 2014 21:47:37 +0000 (23:47 +0200)
committerRobert Varga <rovarga@cisco.com>
Sat, 30 Aug 2014 07:31:48 +0000 (09:31 +0200)
These context use the filan modifier needlessly, so remove them to get
rid of sonar warnings.

Change-Id: I1ec3133c3978b0cfaa31c74ba57393ff9973ddc6
Signed-off-by: Robert Varga <rovarga@cisco.com>
code-generator/binding-model-api/src/main/java/org/opendaylight/yangtools/sal/binding/model/api/type/builder/GeneratedTypeBuilderBase.java
yang/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/BindingMapping.java
yang/yang-data-api/src/main/java/org/opendaylight/yangtools/yang/data/api/NodeModificationBuilder.java
yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/ImmutableNodes.java

index 628029f02869760998d3f33618832b2f70a428c2..f4052150595da7b4f1043c5c5ac753c901d71ff9 100644 (file)
@@ -30,7 +30,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            Name of Enclosing Type
      * @return <code>new</code> Instance of Generated Type Builder.
      */
-    GeneratedTOBuilder addEnclosingTransferObject(final String name);
+    GeneratedTOBuilder addEnclosingTransferObject(String name);
 
     /**
      * Adds new Enclosing Transfer Object <code>genTOBuilder</code> into
@@ -49,7 +49,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      * @param genTOBuilder
      *            Name of Enclosing Type
      */
-    T addEnclosingTransferObject(final GeneratedTOBuilder genTOBuilder);
+    T addEnclosingTransferObject(GeneratedTOBuilder genTOBuilder);
 
     /**
      * Adds String definition of comment into Method Signature definition. <br>
@@ -59,7 +59,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      * @param comment
      *            Comment String.
      */
-    T addComment(final String comment);
+    T addComment(String comment);
 
     /**
      * The method creates new AnnotationTypeBuilder containing specified package
@@ -74,7 +74,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            Name of Annotation Type
      * @return <code>new</code> instance of Annotation Type Builder.
      */
-    AnnotationTypeBuilder addAnnotation(final String packageName, final String name);
+    AnnotationTypeBuilder addAnnotation(String packageName, String name);
 
     boolean isAbstract();
 
@@ -96,7 +96,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            Type to implement
      * @return <code>true</code> if the addition of type is successful.
      */
-    T addImplementsType(final Type genType);
+    T addImplementsType(Type genType);
 
     /**
      * Adds Constant definition and returns <code>new</code> Constant instance. <br>
@@ -113,7 +113,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            Assigned Value
      * @return <code>new</code> Constant instance.
      */
-    Constant addConstant(final Type type, final String name, final Object value);
+    Constant addConstant(Type type, String name, Object value);
 
     /**
      * Adds new Enumeration definition for Generated Type Builder and returns
@@ -128,7 +128,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            Enumeration Name
      * @return <code>new</code> instance of Enumeration Builder.
      */
-    EnumBuilder addEnumeration(final String name);
+    EnumBuilder addEnumeration(String name);
 
     List<MethodSignatureBuilder> getMethodDefinitions();
 
@@ -146,7 +146,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            Name of Method
      * @return <code>new</code> instance of Method Signature Builder.
      */
-    MethodSignatureBuilder addMethod(final String name);
+    MethodSignatureBuilder addMethod(String name);
 
     /**
      * Checks if GeneratedTypeBuilder contains method with name
@@ -155,7 +155,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      * @param methodName
      *            is method name
      */
-    boolean containsMethod(final String methodName);
+    boolean containsMethod(String methodName);
 
     List<GeneratedPropertyBuilder> getProperties();
 
@@ -169,7 +169,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            Name of Property
      * @return <code>new</code> instance of Generated Property Builder.
      */
-    GeneratedPropertyBuilder addProperty(final String name);
+    GeneratedPropertyBuilder addProperty(String name);
 
     /**
      * Check whether GeneratedTOBuilder contains property with name
@@ -179,7 +179,7 @@ public interface GeneratedTypeBuilderBase<T extends GeneratedTypeBuilderBase<T>>
      *            of property which existance is checked
      * @return true if property <code>name</code> exists in list of properties.
      */
-    boolean containsProperty(final String name);
+    boolean containsProperty(String name);
 
     /**
      * Set a string that contains a human-readable textual description of type
index 2966fb982fcb7a7cac76965d2e1c01b1e6df53a2..d628de016c44354fd721b5ba3f9a094799795d87 100644 (file)
@@ -12,10 +12,12 @@ import static com.google.common.base.Preconditions.checkArgument;
 import com.google.common.base.CharMatcher;
 import com.google.common.base.Splitter;
 import com.google.common.collect.ImmutableSet;
+
 import java.text.SimpleDateFormat;
 import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.common.QNameModule;
 
@@ -66,11 +68,11 @@ public final class BindingMapping {
         throw new UnsupportedOperationException("Utility class should not be instantiated");
     }
 
-    public static final String getRootPackageName(final QName module) {
+    public static String getRootPackageName(final QName module) {
         return getRootPackageName(module.getModule());
     }
 
-    public static final String getRootPackageName(final QNameModule module) {
+    public static String getRootPackageName(final QNameModule module) {
         checkArgument(module != null, "Module must not be null");
         checkArgument(module.getRevision() != null, "Revision must not be null");
         checkArgument(module.getNamespace() != null, "Namespace must not be null");
@@ -132,22 +134,22 @@ public final class BindingMapping {
         return builder.toString();
     }
 
-    public static final String getMethodName(final QName name) {
+    public static String getMethodName(final QName name) {
         checkArgument(name != null, "Name should not be null.");
         return getMethodName(name.getLocalName());
     }
 
-    public static final String getClassName(final String localName) {
+    public static String getClassName(final String localName) {
         checkArgument(localName != null, "Name should not be null.");
         return toFirstUpper(toCamelCase(localName));
     }
 
-    public static final String getMethodName(final String yangIdentifier) {
+    public static String getMethodName(final String yangIdentifier) {
         checkArgument(yangIdentifier != null,"Identifier should not be null");
         return toFirstLower(toCamelCase(yangIdentifier));
     }
 
-    public static final String getClassName(final QName name) {
+    public static String getClassName(final QName name) {
         checkArgument(name != null, "Name should not be null.");
         return toFirstUpper(toCamelCase(name.getLocalName()));
     }
@@ -160,7 +162,7 @@ public final class BindingMapping {
         return potential;
     }
 
-    private static final String toCamelCase(final String rawString) {
+    private static String toCamelCase(final String rawString) {
         checkArgument(rawString != null, "String should not be null");
         Iterable<String> components = CAMEL_SPLITTER.split(rawString);
         StringBuilder builder = new StringBuilder();
@@ -170,7 +172,7 @@ public final class BindingMapping {
         return checkNumericPrefix(builder.toString());
     }
 
-    private static final String checkNumericPrefix(final String rawString) {
+    private static String checkNumericPrefix(final String rawString) {
         if (rawString == null || rawString.isEmpty()) {
             return rawString;
         }
index b8b6d14d1b84a4fc1d8320290105f27005590209..fc86f71e13e17655ea74879622ce19da588d2e5d 100644 (file)
@@ -16,26 +16,26 @@ package org.opendaylight.yangtools.yang.data.api;
 @Deprecated
 public interface NodeModificationBuilder {
 
-    abstract Node<?> getMutableEquivalent(Node<?> originalNode);
+    Node<?> getMutableEquivalent(Node<?> originalNode);
 
-    abstract CompositeNode buildDiffTree();
+    CompositeNode buildDiffTree();
 
-    abstract void mergeNode(MutableCompositeNode alteredNode);
+    void mergeNode(MutableCompositeNode alteredNode);
 
-    abstract void removeNode(MutableCompositeNode deadNode);
+    void removeNode(MutableCompositeNode deadNode);
 
-    abstract void removeNode(MutableSimpleNode<?> deadNode);
+    void removeNode(MutableSimpleNode<?> deadNode);
 
-    abstract void deleteNode(MutableSimpleNode<?> deadNode);
+    void deleteNode(MutableSimpleNode<?> deadNode);
 
-    abstract void deleteNode(MutableCompositeNode deadNode);
+    void deleteNode(MutableCompositeNode deadNode);
 
-    abstract void replaceNode(MutableCompositeNode replacementNode);
+    void replaceNode(MutableCompositeNode replacementNode);
 
-    abstract void replaceNode(MutableSimpleNode<?> replacementNode);
+    void replaceNode(MutableSimpleNode<?> replacementNode);
 
-    abstract void addNode(MutableCompositeNode newNode);
+    void addNode(MutableCompositeNode newNode);
 
-    abstract void addNode(MutableSimpleNode<?> newNode);
+    void addNode(MutableSimpleNode<?> newNode);
 
 }
index fc5c20e6fde66e21fa0c6e9159dfadbf0b1dfc80..73361f1922820c29c38766ce894358ea577efc52 100644 (file)
@@ -27,11 +27,11 @@ public final class ImmutableNodes {
         throw new UnsupportedOperationException("Utilities class should not be instantiated");
     }
 
-    public static final CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder() {
+    public static CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder() {
         return ImmutableMapNodeBuilder.create();
     }
 
-    public static final CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder(final QName name) {
+    public static CollectionNodeBuilder<MapEntryNode, MapNode> mapNodeBuilder(final QName name) {
         return ImmutableMapNodeBuilder.create().withNodeIdentifier(new NodeIdentifier(name));
     }
 
@@ -42,7 +42,7 @@ public final class ImmutableNodes {
      * @param value Value of leaf node
      * @return Leaf node with supplied identifier and value
      */
-    public static final <T> LeafNode<T> leafNode(final NodeIdentifier name,final T value) {
+    public static <T> LeafNode<T> leafNode(final NodeIdentifier name,final T value) {
         return ImmutableLeafNodeBuilder.<T>create()
                 .withNodeIdentifier(name)
                 .withValue(value)
@@ -50,14 +50,13 @@ public final class ImmutableNodes {
     }
 
     /**
-     *
      * Construct immutable leaf node
      *
      * @param name QName which will be used as node identifier
      * @param value Value of leaf node.
      * @return Leaf node with supplied identifier and value
      */
-    public static final <T> LeafNode<T> leafNode(final QName name,final T value) {
+    public static <T> LeafNode<T> leafNode(final QName name,final T value) {
         return leafNode(new NodeIdentifier(name), value);
     }