commit | 5de36e4f758ad8c735300cc16166bd4e10221fc2 | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Wed Mar 29 19:40:28 2017 +0900 |
committer | Ray Milkey <ray@onlab.us> | Wed Mar 29 17:35:04 2017 +0000 |
tree | 6bf4045dbc8733219aa08ecdd8d118575be88670 | |
parent | b54d14b779ae4ec1523e11ebabd11d2ee7a4a841 [diff] |
Fix: Add missing decode method for MappingInstructionCodec Change-Id: I94af9585a4b622e6320e2e43f40004947b686fa2
diff --git a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingInstructionCodec.java b/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingInstructionCodec.java index dff9133..96b4a7c 100644 --- a/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingInstructionCodec.java +++ b/apps/mappingmanagement/web/src/main/java/org/onosproject/mapping/web/codec/MappingInstructionCodec.java
@@ -49,4 +49,13 @@ return new EncodeMappingInstructionCodecHelper(instruction, context).encode(); } + + @Override + public MappingInstruction decode(ObjectNode json, CodecContext context) { + if (json == null || !json.isObject()) { + return null; + } + + return new DecodeMappingInstructionCodecHelper(json, context).decode(); + } }