Fix checkstyle violations in restconf-common 49/68549/4
authorTom Pantelis <tompantelis@gmail.com>
Fri, 23 Feb 2018 14:25:46 +0000 (09:25 -0500)
committerJakubToth <jakub.toth@pantheon.tech>
Tue, 27 Feb 2018 20:01:13 +0000 (20:01 +0000)
Change-Id: Ib57f7ba64c0804e2c3cdd81c264c0b2a80f24d5f
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/context/WriterParameters.java
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfDocumentedException.java
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/errors/RestconfError.java
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/util/RestUtil.java
restconf/restconf-common/src/main/java/org/opendaylight/restconf/common/validation/RestconfValidationUtils.java

index 4f82f24b3210d55af99f4a5d76e995136e99abd3..8941f9751ccd1a692c426c83a9ef8d30cb6f51cc 100644 (file)
@@ -12,7 +12,7 @@ import java.util.List;
 import java.util.Set;
 import org.opendaylight.yangtools.yang.common.QName;
 
-public class WriterParameters {
+public final class WriterParameters {
     private final String content;
     private final Integer depth;
     private final List<Set<QName>> fields;
index dd93c534ba1ed1ec626487d4a6dc72549e231aa8..130d8bef793f0d057ecbca6a3addb6507f87e69e 100644 (file)
@@ -9,7 +9,6 @@
 package org.opendaylight.restconf.common.errors;
 
 import com.google.common.base.Preconditions;
-import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
 import java.util.Collection;
index 0ed06e840abf31a51f1f4cb90dce2a97dabf3e78..5e369dd894e6d1cf8e75ed20576de76db7a5344c 100644 (file)
@@ -220,18 +220,18 @@ public class RestconfError {
         this.errorMessage = rpcError.getMessage();
         this.errorAppTag = rpcError.getApplicationTag();
 
-        String errorInfo = null;
+        String localErrorInfo = null;
         if (rpcError.getInfo() == null) {
             if (rpcError.getCause() != null) {
-                errorInfo = Throwables.getStackTraceAsString(rpcError.getCause());
+                localErrorInfo = Throwables.getStackTraceAsString(rpcError.getCause());
             } else if (rpcError.getSeverity() != null) {
-                errorInfo = "<severity>" + rpcError.getSeverity().toString().toLowerCase() + "</severity>";
+                localErrorInfo = "<severity>" + rpcError.getSeverity().toString().toLowerCase() + "</severity>";
             }
         } else {
-            errorInfo = rpcError.getInfo();
+            localErrorInfo = rpcError.getInfo();
         }
 
-        this.errorInfo = errorInfo;
+        this.errorInfo = localErrorInfo;
         this.errorPath = null;
     }
 
index ff04373f2c0ad9de09a0979ecc428dee4100e1ce..82551250ac29edf46f02b2d0973ea15a40c2ba57 100644 (file)
@@ -29,6 +29,9 @@ public final class RestUtil {
     public static final String DQUOTE = "\"";
     private static final Pattern PREDICATE_PATTERN = Pattern.compile("\\[(.*?)\\]");
 
+    private RestUtil() {
+    }
+
     public static TypeDefinition<?> resolveBaseTypeFrom(final TypeDefinition<?> type) {
         TypeDefinition<?> superType = type;
         while (superType.getBaseType() != null) {
index cdd30aaee2e9a76c546356b153108ef49cb59c6b..117b7041ddb6132b3b7d7d316387c1fc5fcbcfbe 100644 (file)
@@ -22,7 +22,7 @@ import org.opendaylight.restconf.common.errors.RestconfError.ErrorType;
  * for all error situation followed by restconf-netconf specification.
  * See also <a href="https://tools.ietf.org/html/draft-bierman-netconf-restconf-02">RESTCONF</a>.
  */
-public class RestconfValidationUtils {
+public final class RestconfValidationUtils {
 
     private RestconfValidationUtils() {
         throw new UnsupportedOperationException("Utility class");