commit | 1375cfe97631d9322870c81af7317fe19efccd21 | [log] [tgz] |
---|---|---|
author | Sho SHIMIZU <sshimizu@us.fujitsu.com> | Thu Aug 18 09:33:37 2016 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Fri Aug 19 20:03:35 2016 +0000 |
tree | f14a0f39f48910d913d811658db3ae2de8174b7e | |
parent | dbf59f02814b939aad02819f3fe24723939475ca [diff] |
Simplify boolean expression Change-Id: If0f8d497ac927bdd007292e45f0e394c207163d2
diff --git a/providers/bgpcep/flow/src/main/java/org/onosproject/provider/bgpcep/flow/impl/BgpcepFlowRuleProvider.java b/providers/bgpcep/flow/src/main/java/org/onosproject/provider/bgpcep/flow/impl/BgpcepFlowRuleProvider.java index 7330a3a..fd141f7 100644 --- a/providers/bgpcep/flow/src/main/java/org/onosproject/provider/bgpcep/flow/impl/BgpcepFlowRuleProvider.java +++ b/providers/bgpcep/flow/src/main/java/org/onosproject/provider/bgpcep/flow/impl/BgpcepFlowRuleProvider.java
@@ -430,7 +430,7 @@ Tunnel tunnel = tunnelService.queryTunnel(tunnelId); PcepLabelObject labelObj = pc.factory().buildLabelObject() - .setOFlag(labelType == OUT_LABEL_TYPE ? true : false) + .setOFlag(labelType == OUT_LABEL_TYPE) .setOptionalTlv(optionalTlv) .setLabel((int) labelId.labelId()) .build();
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java index 7a2edc2..54f704f 100644 --- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java +++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/util/FlowEntryBuilder.java
@@ -487,7 +487,7 @@ case MPLS_BOS: @SuppressWarnings("unchecked") OFOxm<U8> mplsBos = (OFOxm<U8>) oxm; - builder.setMplsBos(mplsBos.getValue() == U8.ZERO ? false : true); + builder.setMplsBos(mplsBos.getValue() != U8.ZERO); break; case TUNNEL_ID: @SuppressWarnings("unchecked")