Committed by
Gerrit Code Review
BugFix: Comparing MplsLabel against int
- MplsCriterion#label() returns MplsLabel, while ModMplsLabelInstruction#label() returns int Change-Id: Ia0d57651fd3553ffb4e4f07dc51c420a09028f6e
Showing
2 changed files
with
6 additions
and
1 deletions
| ... | @@ -342,10 +342,15 @@ public abstract class L2ModificationInstruction implements Instruction { | ... | @@ -342,10 +342,15 @@ public abstract class L2ModificationInstruction implements Instruction { |
| 342 | this.mplsLabel = mplsLabel; | 342 | this.mplsLabel = mplsLabel; |
| 343 | } | 343 | } |
| 344 | 344 | ||
| 345 | + // might want to deprecate this in the long run | ||
| 345 | public Integer label() { | 346 | public Integer label() { |
| 346 | return mplsLabel.toInt(); | 347 | return mplsLabel.toInt(); |
| 347 | } | 348 | } |
| 348 | 349 | ||
| 350 | + public MplsLabel mplsLabel() { | ||
| 351 | + return mplsLabel; | ||
| 352 | + } | ||
| 353 | + | ||
| 349 | @Override | 354 | @Override |
| 350 | public L2SubType subtype() { | 355 | public L2SubType subtype() { |
| 351 | return L2SubType.MPLS_LABEL; | 356 | return L2SubType.MPLS_LABEL; | ... | ... |
| ... | @@ -252,7 +252,7 @@ public final class FlowObjectiveCompositionUtil { | ... | @@ -252,7 +252,7 @@ public final class FlowObjectiveCompositionUtil { |
| 252 | case MPLS_LABEL: | 252 | case MPLS_LABEL: |
| 253 | if (criterionMap.containsKey(Criterion.Type.MPLS_LABEL)) { | 253 | if (criterionMap.containsKey(Criterion.Type.MPLS_LABEL)) { |
| 254 | if (((MplsCriterion) criterionMap.get((Criterion.Type.MPLS_LABEL))).label() | 254 | if (((MplsCriterion) criterionMap.get((Criterion.Type.MPLS_LABEL))).label() |
| 255 | - .equals(((L2ModificationInstruction.ModMplsLabelInstruction) l2).label())) { | 255 | + .equals(((L2ModificationInstruction.ModMplsLabelInstruction) l2).mplsLabel())) { |
| 256 | criterionMap.remove(Criterion.Type.ETH_DST); | 256 | criterionMap.remove(Criterion.Type.ETH_DST); |
| 257 | } else { | 257 | } else { |
| 258 | return null; | 258 | return null; | ... | ... |
-
Please register or login to post a comment