Address trivial eclipse warnings
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / codec / EnumStringCodec.java
index 54fe384de8334340c12522b0a53876779b7d835f..bfc67e49bb00be34c5ec3f1618ae56a1a552ebb3 100644 (file)
@@ -41,16 +41,16 @@ final class EnumStringCodec extends TypeDefinitionAwareCodec<String, EnumTypeDef
 
     @Override
     public String deserialize(final String s) {
-        if (values != null) {
-            // Lookup the serialized string in the values. Returned string is the interned instance, which we want
-            // to use as the result.
-            final String result = values.get(s);
-            Preconditions.checkArgument(result != null, "Invalid value '%s' for enum type. Allowed values are: %s",
-                s, values.keySet());
-            return result;
-        } else {
+        if (values == null) {
             return s;
         }
+
+        // Lookup the serialized string in the values. Returned string is the interned instance, which we want
+        // to use as the result.
+        final String result = values.get(s);
+        Preconditions.checkArgument(result != null, "Invalid value '%s' for enum type. Allowed values are: %s",
+                s, values.keySet());
+        return result;
     }
 
     @Override