Switch encoding unsigned type normalization to Uint* types
[yangtools.git] / yang / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / codec / Uint8StringCodec.java
index f16b236e13da0c019710c03e3dcf1cd315bb0f5c..21f3cc44c643f26dbc7da7fec8b6a36e42dd313b 100644 (file)
@@ -7,17 +7,18 @@
  */
 package org.opendaylight.yangtools.yang.data.impl.codec;
 
+import org.opendaylight.yangtools.yang.common.Uint8;
 import org.opendaylight.yangtools.yang.data.api.codec.Uint8Codec;
 import org.opendaylight.yangtools.yang.model.api.type.Uint8TypeDefinition;
 
-final class Uint8StringCodec extends AbstractIntegerStringCodec<Short, Uint8TypeDefinition> implements
+final class Uint8StringCodec extends AbstractIntegerStringCodec<Uint8, Uint8TypeDefinition> implements
         Uint8Codec<String> {
     Uint8StringCodec(final Uint8TypeDefinition typeDef) {
-        super(typeDef, extractRange(typeDef), Short.class);
+        super(typeDef, extractRange(typeDef), Uint8.class);
     }
 
     @Override
-    protected Short deserialize(final String stringRepresentation, final int base) {
-        return Short.valueOf(stringRepresentation, base);
+    protected Uint8 deserialize(final String stringRepresentation, final int base) {
+        return Uint8.valueOf(stringRepresentation, base);
     }
 }