Clean pcep/base-parser code
[bgpcep.git] / pcep / base-parser / src / main / java / org / opendaylight / protocol / pcep / parser / subobject / XROSrlgSubobjectParser.java
similarity index 95%
rename from pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROSRLGSubobjectParser.java
rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROSrlgSubobjectParser.java
index 4b7d76f7283b01b7ca5b5b095042ebc991a4b7ce..aab5d4f4b90413fa502252724f2ef0b5a1925d11 100644 (file)
@@ -29,9 +29,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev
 import org.opendaylight.yangtools.yang.common.Uint8;
 
 /**
- * Parser for {@link SrlgCase}
+ * Parser for {@link SrlgCase}.
  */
-public class XROSRLGSubobjectParser implements XROSubobjectParser, XROSubobjectSerializer {
+public class XROSrlgSubobjectParser implements XROSubobjectParser, XROSubobjectSerializer {
 
     public static final int TYPE = 34;
 
@@ -66,7 +66,7 @@ public class XROSRLGSubobjectParser implements XROSubobjectParser, XROSubobjectS
         writeUnsignedInt(specObj.getSrlgId().getValue(), body);
         checkArgument(subobject.getAttribute() != null, "Attribute is mandatory.");
         writeUnsignedByte((Uint8) null, body);
-        writeUnsignedByte((short) subobject.getAttribute().getIntValue(), body);
+        writeUnsignedByte(Uint8.valueOf(subobject.getAttribute().getIntValue()), body);
         XROSubobjectUtil.formatSubobject(TYPE, subobject.isMandatory(), body, buffer);
     }
 }