We are using different objects here, which unfortunately is bound to
break at some point in the future. For now change the values to lie
outside of the cached range, use Integer.valueOf() and flip modernizer
to enforcing mode.
Change-Id: I8b2a1f4c24846d4d95fc610f25de1fa978b8e649
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
<artifactId>openflowplugin-impl</artifactId>
<packaging>bundle</packaging>
<artifactId>openflowplugin-impl</artifactId>
<packaging>bundle</packaging>
- <properties>
- <!-- FIXME: Remove this -->
- <odlparent.modernizer.enforce>false</odlparent.modernizer.enforce>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
- final Integer[] integers = {-100, 0, 100,};
+ final Integer[] integers = {-1000, 0, 1000,};
for (final Integer def : integers) {
for (final Integer def : integers) {
- final Integer same = new Integer(def);
+ final Integer same = Integer.valueOf(def);
assertTrue(FlowCreatorUtil.equalsWithDefault(null, null, def));
assertTrue(FlowCreatorUtil.equalsWithDefault(same, null, def));
assertTrue(FlowCreatorUtil.equalsWithDefault(null, same, def));
assertTrue(FlowCreatorUtil.equalsWithDefault(null, null, def));
assertTrue(FlowCreatorUtil.equalsWithDefault(same, null, def));
assertTrue(FlowCreatorUtil.equalsWithDefault(null, same, def));
- final Integer diff = new Integer(def.intValue() + 1);
+ final Integer diff = Integer.valueOf(def.intValue() + 1);
assertFalse(FlowCreatorUtil.equalsWithDefault(null, diff, def));
assertFalse(FlowCreatorUtil.equalsWithDefault(diff, null, def));
}
assertFalse(FlowCreatorUtil.equalsWithDefault(null, diff, def));
assertFalse(FlowCreatorUtil.equalsWithDefault(diff, null, def));
}