Use valueOf().
This commit is contained in:
parent
2d86ac6ecf
commit
b4a43380f1
|
@ -356,9 +356,9 @@ public class DiffBuilderTest {
|
|||
@Test
|
||||
public void testObjectsNotSameButEqual() {
|
||||
final TypeTestClass left = new TypeTestClass();
|
||||
left.objectField = new Integer(1);
|
||||
left.objectField = Integer.valueOf(1);
|
||||
final TypeTestClass right = new TypeTestClass();
|
||||
right.objectField = new Integer(1);
|
||||
right.objectField = Integer.valueOf(1);
|
||||
assertNotSame(left.objectField, right.objectField);
|
||||
assertEquals(left.objectField, right.objectField);
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ public class ImmutableTripleTest {
|
|||
assertNull(triple2.getLeft());
|
||||
assertEquals("bar", triple2.middle);
|
||||
assertEquals("bar", triple2.getMiddle());
|
||||
assertEquals(new Integer(42), triple2.right);
|
||||
assertEquals(new Integer(42), triple2.getRight());
|
||||
assertEquals(Integer.valueOf(42), triple2.right);
|
||||
assertEquals(Integer.valueOf(42), triple2.getRight());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -131,7 +131,7 @@ public class TripleTest {
|
|||
assertTrue(triple2 instanceof ImmutableTriple<?, ?, ?>);
|
||||
assertNull(((ImmutableTriple<Object, String, Long>) triple2).left);
|
||||
assertEquals("bar", ((ImmutableTriple<Object, String, Long>) triple2).middle);
|
||||
assertEquals(new Long(200L), ((ImmutableTriple<Object, String, Long>) triple2).right);
|
||||
assertEquals(Long.valueOf(200L), ((ImmutableTriple<Object, String, Long>) triple2).right);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue