Committed by
Gerrit Code Review
Simplify boolean expression
Change-Id: If0f8d497ac927bdd007292e45f0e394c207163d2
Showing
2 changed files
with
2 additions
and
2 deletions
| ... | @@ -430,7 +430,7 @@ public class BgpcepFlowRuleProvider extends AbstractProvider | ... | @@ -430,7 +430,7 @@ public class BgpcepFlowRuleProvider extends AbstractProvider |
| 430 | Tunnel tunnel = tunnelService.queryTunnel(tunnelId); | 430 | Tunnel tunnel = tunnelService.queryTunnel(tunnelId); |
| 431 | 431 | ||
| 432 | PcepLabelObject labelObj = pc.factory().buildLabelObject() | 432 | PcepLabelObject labelObj = pc.factory().buildLabelObject() |
| 433 | - .setOFlag(labelType == OUT_LABEL_TYPE ? true : false) | 433 | + .setOFlag(labelType == OUT_LABEL_TYPE) |
| 434 | .setOptionalTlv(optionalTlv) | 434 | .setOptionalTlv(optionalTlv) |
| 435 | .setLabel((int) labelId.labelId()) | 435 | .setLabel((int) labelId.labelId()) |
| 436 | .build(); | 436 | .build(); | ... | ... |
| ... | @@ -487,7 +487,7 @@ public class FlowEntryBuilder { | ... | @@ -487,7 +487,7 @@ public class FlowEntryBuilder { |
| 487 | case MPLS_BOS: | 487 | case MPLS_BOS: |
| 488 | @SuppressWarnings("unchecked") | 488 | @SuppressWarnings("unchecked") |
| 489 | OFOxm<U8> mplsBos = (OFOxm<U8>) oxm; | 489 | OFOxm<U8> mplsBos = (OFOxm<U8>) oxm; |
| 490 | - builder.setMplsBos(mplsBos.getValue() == U8.ZERO ? false : true); | 490 | + builder.setMplsBos(mplsBos.getValue() != U8.ZERO); |
| 491 | break; | 491 | break; |
| 492 | case TUNNEL_ID: | 492 | case TUNNEL_ID: |
| 493 | @SuppressWarnings("unchecked") | 493 | @SuppressWarnings("unchecked") | ... | ... |
-
Please register or login to post a comment