summaryrefslogtreecommitdiff
path: root/bridges/test
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:09:06 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:17 +0200
commitff0ad0493ee1729c726587f667761b04101d774c (patch)
tree8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /bridges/test
parentbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff)
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'bridges/test')
-rw-r--r--bridges/test/java_remote/PolyStructTest.java14
-rw-r--r--bridges/test/java_uno/any/TestAny.java16
2 files changed, 15 insertions, 15 deletions
diff --git a/bridges/test/java_remote/PolyStructTest.java b/bridges/test/java_remote/PolyStructTest.java
index c0b2e9b22a44..337a061d1d09 100644
--- a/bridges/test/java_remote/PolyStructTest.java
+++ b/bridges/test/java_remote/PolyStructTest.java
@@ -82,15 +82,15 @@ public final class PolyStructTest extends ComplexTestCase {
new TestPolyStruct(new Short(Short.MAX_VALUE))).member);
assertEquals(
- new Integer(0), t.transportLong(new TestPolyStruct()).member);
+ Integer.valueOf(0), t.transportLong(new TestPolyStruct()).member);
assertEquals(
- new Integer(Integer.MIN_VALUE),
+ Integer.valueOf(Integer.MIN_VALUE),
t.transportLong(
- new TestPolyStruct(new Integer(Integer.MIN_VALUE))).member);
+ new TestPolyStruct(Integer.valueOf(Integer.MIN_VALUE))).member);
assertEquals(
- new Integer(Integer.MAX_VALUE),
+ Integer.valueOf(Integer.MAX_VALUE),
t.transportLong(
- new TestPolyStruct(new Integer(Integer.MAX_VALUE))).member);
+ new TestPolyStruct(Integer.valueOf(Integer.MAX_VALUE))).member);
assertEquals(
new Long(0L), t.transportHyper(new TestPolyStruct()).member);
@@ -161,10 +161,10 @@ public final class PolyStructTest extends ComplexTestCase {
Any.VOID, t.transportAny(new TestPolyStruct(Any.VOID)).member);
assertEquals(null, t.transportAny(new TestPolyStruct(null)).member);
assertEquals(
- new Any(Type.UNSIGNED_LONG, new Integer(5)),
+ new Any(Type.UNSIGNED_LONG, Integer.valueOf(5)),
t.transportAny(
new TestPolyStruct(
- new Any(Type.UNSIGNED_LONG, new Integer(5)))).member);
+ new Any(Type.UNSIGNED_LONG, Integer.valueOf(5)))).member);
assertEquals(
TestEnum.VALUE1, t.transportEnum(new TestPolyStruct()).member);
diff --git a/bridges/test/java_uno/any/TestAny.java b/bridges/test/java_uno/any/TestAny.java
index d77e866f64a6..2c1575fcf555 100644
--- a/bridges/test/java_uno/any/TestAny.java
+++ b/bridges/test/java_uno/any/TestAny.java
@@ -168,29 +168,29 @@ final class TestAny {
new CompareBoxed());
// LONG:
- success &= testMapAny(transport, new Integer(-2147483648),
+ success &= testMapAny(transport, Integer.valueOf(-2147483648),
new CompareBoxed());
- success &= testMapAny(transport, new Integer(0),
+ success &= testMapAny(transport, Integer.valueOf(0),
new CompareBoxed());
- success &= testMapAny(transport, new Integer(2147483647),
+ success &= testMapAny(transport, Integer.valueOf(2147483647),
new CompareBoxed());
success &= testMapAny(transport,
- new Any(Type.LONG, new Integer(-2147483648)),
+ new Any(Type.LONG, Integer.valueOf(-2147483648)),
new CompareUnboxed());
success &= testMapAny(transport,
- new Any(Type.LONG, new Integer(0)),
+ new Any(Type.LONG, Integer.valueOf(0)),
new CompareUnboxed());
success &= testMapAny(transport,
- new Any(Type.LONG, new Integer(2147483647)),
+ new Any(Type.LONG, Integer.valueOf(2147483647)),
new CompareUnboxed());
// UNSIGNED LONG:
success &= testMapAny(transport,
- new Any(Type.UNSIGNED_LONG, new Integer(0)),
+ new Any(Type.UNSIGNED_LONG, Integer.valueOf(0)),
new CompareBoxed());
success &= testMapAny(transport,
new Any(Type.UNSIGNED_LONG,
- new Integer(-2147483648)),
+ Integer.valueOf(-2147483648)),
new CompareBoxed());
// HYPER: