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 /jurt/com/sun/star | |
parent | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff) |
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'jurt/com/sun/star')
4 files changed, 10 insertions, 10 deletions
diff --git a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java index 465769be3768..edcceca44757 100644 --- a/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java +++ b/jurt/com/sun/star/lib/uno/bridges/java_remote/ProxyFactory.java @@ -107,7 +107,7 @@ final class ProxyFactory { return Boolean.valueOf(args[0] != null && oid.equals(UnoRuntime.generateOid(args[0]))); } else if (method.equals(METHOD_HASH_CODE)) { - return new Integer(oid.hashCode()); + return Integer.valueOf(oid.hashCode()); } else if (method.equals(METHOD_TO_STRING)) { return "[Proxy:" + System.identityHashCode(proxy) + "," + oid + "," + type + "]"; diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java index 2a4c9d5029a9..b2776e23b66d 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java @@ -226,7 +226,7 @@ final class Unmarshal { private Integer readLongValue() { try { - return new Integer(input.readInt()); + return Integer.valueOf(input.readInt()); } catch (IOException e) { throw new RuntimeException(e.toString()); } diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java index 08e7ef3380a2..f60f697ead51 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java @@ -204,7 +204,7 @@ public final class urp implements IProtocol { true, PROPERTIES_OID, TypeDescription.getTypeDescription(XProtocolProperties.class), PROPERTIES_FUN_REQUEST_CHANGE, propertiesTid, - new Object[] { new Integer(random) }); + new Object[] { Integer.valueOf(random) }); state = STATE_REQUESTED; } @@ -225,7 +225,7 @@ public final class urp implements IProtocol { case STATE_INITIAL0: case STATE_INITIAL: writeReply( - false, message.getThreadId(), new Integer(1)); + false, message.getThreadId(), Integer.valueOf(1)); state = STATE_WAIT; break; case STATE_REQUESTED: @@ -233,16 +233,16 @@ public final class urp implements IProtocol { = ((Integer) message.getArguments()[0]).intValue(); if (random < n) { writeReply( - false, message.getThreadId(), new Integer(1)); + false, message.getThreadId(), Integer.valueOf(1)); state = STATE_WAIT; } else if (random == n) { writeReply( - false, message.getThreadId(), new Integer(-1)); + false, message.getThreadId(), Integer.valueOf(-1)); state = STATE_INITIAL; sendRequestChange(); } else { writeReply( - false, message.getThreadId(), new Integer(0)); + false, message.getThreadId(), Integer.valueOf(0)); } break; default: diff --git a/jurt/com/sun/star/uno/AnyConverter.java b/jurt/com/sun/star/uno/AnyConverter.java index 873deb157da2..9acdb1622e16 100644 --- a/jurt/com/sun/star/uno/AnyConverter.java +++ b/jurt/com/sun/star/uno/AnyConverter.java @@ -555,10 +555,10 @@ public class AnyConverter case TypeClass.LONG_value: switch (tc) { case TypeClass.BYTE_value: - return new Integer( ((Byte)object).byteValue() ); + return Integer.valueOf( ((Byte)object).byteValue() ); case TypeClass.SHORT_value: case TypeClass.UNSIGNED_SHORT_value: - return new Integer( ((Short)object).shortValue() ); + return Integer.valueOf( ((Short)object).shortValue() ); case TypeClass.LONG_value: return object; } @@ -566,7 +566,7 @@ public class AnyConverter case TypeClass.UNSIGNED_LONG_value: switch (tc) { case TypeClass.UNSIGNED_SHORT_value: - return new Integer( ((Short)object).shortValue() ); + return Integer.valueOf( ((Short)object).shortValue() ); case TypeClass.UNSIGNED_LONG_value: return object; } |