diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 15:09:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:17 +0200 |
commit | ff0ad0493ee1729c726587f667761b04101d774c (patch) | |
tree | 8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /bridges | |
parent | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff) |
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/PolyStructTest.java | 14 | ||||
-rw-r--r-- | bridges/test/java_uno/any/TestAny.java | 16 |
3 files changed, 16 insertions, 16 deletions
diff --git a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java index 8f8727256d82..8a60beec4c46 100644 --- a/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java +++ b/bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java @@ -157,7 +157,7 @@ public final class JNI_proxy implements java.lang.reflect.InvocationHandler if (method_name.equals( "hashCode" )) { // int hashCode() - return new Integer( m_oid.hashCode() ); + return Integer.valueOf( m_oid.hashCode() ); } else if (method_name.equals( "equals" )) { 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: |