Do not support unions with complex types
[yangtools.git] / data / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / codec / DecimalStringCodec.java
index 35a5c87f8ddbd2fa3503c811cc2f599474a78019..c3724ac142eb7dbeb38612c01629e0d0728c8011 100644 (file)
@@ -22,11 +22,11 @@ import org.opendaylight.yangtools.yang.model.api.type.DecimalTypeDefinition;
 public final class DecimalStringCodec extends TypeDefinitionAwareCodec<Decimal64, DecimalTypeDefinition>
         implements DecimalCodec<String> {
     private DecimalStringCodec(final DecimalTypeDefinition typeDef) {
-        super(typeDef, Decimal64.class);
+        super(requireNonNull(typeDef), Decimal64.class);
     }
 
     public static @NonNull DecimalStringCodec from(final DecimalTypeDefinition type) {
-        return new DecimalStringCodec(requireNonNull(type));
+        return new DecimalStringCodec(type);
     }
 
     @Override