HIGUCHI Yuta
Committed by Gerrit Code Review

BugFix: Comparing MplsLabel against int

- MplsCriterion#label() returns MplsLabel, while
  ModMplsLabelInstruction#label() returns int

Change-Id: Ia0d57651fd3553ffb4e4f07dc51c420a09028f6e
......@@ -342,10 +342,15 @@ public abstract class L2ModificationInstruction implements Instruction {
this.mplsLabel = mplsLabel;
}
// might want to deprecate this in the long run
public Integer label() {
return mplsLabel.toInt();
}
public MplsLabel mplsLabel() {
return mplsLabel;
}
@Override
public L2SubType subtype() {
return L2SubType.MPLS_LABEL;
......
......@@ -252,7 +252,7 @@ public final class FlowObjectiveCompositionUtil {
case MPLS_LABEL:
if (criterionMap.containsKey(Criterion.Type.MPLS_LABEL)) {
if (((MplsCriterion) criterionMap.get((Criterion.Type.MPLS_LABEL))).label()
.equals(((L2ModificationInstruction.ModMplsLabelInstruction) l2).label())) {
.equals(((L2ModificationInstruction.ModMplsLabelInstruction) l2).mplsLabel())) {
criterionMap.remove(Criterion.Type.ETH_DST);
} else {
return null;
......