Migrate to use yangtools' ByteBufUtils
[bgpcep.git] / pcep / spi / src / main / java / org / opendaylight / protocol / pcep / spi / PCEPErrors.java
index 48b8548de73467c8d288c4feb1c8b433a6d5b34e..a9390b95e7a34dfbb997f381c3ad268acdf7eac9 100644 (file)
@@ -354,22 +354,22 @@ public enum PCEPErrors {
     private PCEPErrorIdentifier errorId;
 
     public static PCEPErrors forValue(final Uint8 errorType, final Uint8 errorValue) {
-        return VALUE_MAP.get(new PCEPErrorIdentifier(errorType.toJava(), errorValue.toJava()));
+        return VALUE_MAP.get(new PCEPErrorIdentifier(errorType, errorValue));
     }
 
     PCEPErrors(final int type, final int value) {
-        this.errorId = new PCEPErrorIdentifier((short) type, (short) value);
+        this.errorId = new PCEPErrorIdentifier(Uint8.valueOf(type), Uint8.valueOf(value));
     }
 
     private PCEPErrorIdentifier getErrorIdentifier() {
-        return this.errorId;
+        return errorId;
     }
 
-    public short getErrorType() {
-        return this.errorId.getType();
+    public Uint8 getErrorType() {
+        return errorId.getType();
     }
 
-    public short getErrorValue() {
-        return this.errorId.getValue();
+    public Uint8 getErrorValue() {
+        return errorId.getValue();
     }
 }