commit | 125572b666c80aebe515307618a0b5e3c0b9a8ac | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@onlab.us> | Mon Feb 22 16:48:17 2016 -0800 |
committer | Ray Milkey <ray@onlab.us> | Tue Feb 23 08:51:36 2016 -0800 |
tree | c5033d54030dff13373cc5027e82fe3652b9ded2 | |
parent | b0f09be1a4477db10dc74828a3907c6bac9eeea3 [diff] |
Remove methods deprecated in Drake from L2ModificationInstruction API Change-Id: I30dbc2e9c590d4bc2bc672e13581dbd1c3b3561b
diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java index 29b6f99..ff01639 100644 --- a/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java +++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/L2ModificationInstruction.java
@@ -333,20 +333,19 @@ this.mplsLabel = mplsLabel; } - /** - * @deprecated in Drake Release. - * @return integer value of label - */ - // Consider changing return value to MplsLabel - // after deprecation process so that it'll be symmetric to - // MplsCriterion#label() - @Deprecated - public Integer label() { - return mplsLabel.toInt(); + public MplsLabel label() { + return mplsLabel; } + /** + * Extracts the MPLS label from the instruction. + * + * @return MPLS label + * @deprecated deprecated in 1.5.0 Falcon + */ + @Deprecated public MplsLabel mplsLabel() { - return mplsLabel; + return label(); } @Override
diff --git a/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java b/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java index 28b015c..591a73b 100644 --- a/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java +++ b/core/api/src/test/java/org/onosproject/net/flow/instructions/InstructionsTest.java
@@ -636,7 +636,7 @@ checkAndConvert(instruction, Instruction.Type.L2MODIFICATION, L2ModificationInstruction.ModMplsLabelInstruction.class); - assertThat(modMplsLabelInstruction.mplsLabel(), is(equalTo(mplsLabel))); + assertThat(modMplsLabelInstruction.label(), is(equalTo(mplsLabel))); assertThat(modMplsLabelInstruction.subtype(), is(equalTo(L2ModificationInstruction.L2SubType.MPLS_LABEL))); }