We really need the integer object, so don't keep it as a primitive type.
Also make sure we run equals on a constant reference. Finally do not
instantiate a zero integer.
Change-Id: I64875984c66e6a2ae54d9ce3acefb529d500e4f2
Signed-off-by: Robert Varga <rovarga@cisco.com>
VlanVidCaseBuilder vlanVidCaseBuilder = new VlanVidCaseBuilder();
VlanVidBuilder vlanVidBuilder = new VlanVidBuilder();
boolean setCfiBit = false;
VlanVidCaseBuilder vlanVidCaseBuilder = new VlanVidCaseBuilder();
VlanVidBuilder vlanVidBuilder = new VlanVidBuilder();
boolean setCfiBit = false;
- Integer vidEntryValue = new Integer(0);
+ Integer vidEntryValue = 0;
boolean hasmask = false;
if (Boolean.TRUE.equals(vlanId.isVlanIdPresent())) {
setCfiBit = true;
boolean hasmask = false;
if (Boolean.TRUE.equals(vlanId.isVlanIdPresent())) {
setCfiBit = true;
ipv4PrefixStr += IpConversionUtil.PREFIX_SEPARATOR + "32";
}
ipv4PrefixStr += IpConversionUtil.PREFIX_SEPARATOR + "32";
}
- if (!ipv4PrefixStr.equals(noIp)) {
+ if (!noIp.equals(ipv4PrefixStr)) {
ipv4MatchBuilder.setIpv4Source(new Ipv4Prefix(ipv4PrefixStr));
matchBuilder.setLayer3Match(ipv4MatchBuilder.build());
}
ipv4MatchBuilder.setIpv4Source(new Ipv4Prefix(ipv4PrefixStr));
matchBuilder.setLayer3Match(ipv4MatchBuilder.build());
}
ipv4PrefixStr += IpConversionUtil.PREFIX_SEPARATOR + "32";
}
ipv4PrefixStr += IpConversionUtil.PREFIX_SEPARATOR + "32";
}
- if (!ipv4PrefixStr.equals(noIp)) {
+ if (!noIp.equals(ipv4PrefixStr)) {
ipv4MatchBuilder.setIpv4Destination(new Ipv4Prefix(ipv4PrefixStr));
matchBuilder.setLayer3Match(ipv4MatchBuilder.build());
}
ipv4MatchBuilder.setIpv4Destination(new Ipv4Prefix(ipv4PrefixStr));
matchBuilder.setLayer3Match(ipv4MatchBuilder.build());
}
* The value 0xffff (OFP_VLAN_NONE) is used to indicate
* that no VLAN ID is set for OF Flow.
*/
* The value 0xffff (OFP_VLAN_NONE) is used to indicate
* that no VLAN ID is set for OF Flow.
*/
- private static final int OFP_VLAN_NONE = 0xffff;
+ private static final Integer OFP_VLAN_NONE = 0xffff;
/**
* Method builds openflow 1.0 specific match (MatchV10) from MD-SAL match.
/**
* Method builds openflow 1.0 specific match (MatchV10) from MD-SAL match.