summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:12:27 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:18 +0200
commit0764292c5dcb7daa62e9adeb1ac9af1dbe14066f (patch)
tree17a4e9f2393d23aaba1e68bbc944aa8e18b9e2f6 /bridges
parent8a2c6c29af41cd7a62f37861fb0d4e81a857bb45 (diff)
java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
Diffstat (limited to 'bridges')
-rw-r--r--bridges/test/java_remote/PolyStructTest.java10
-rw-r--r--bridges/test/java_uno/any/TestAny.java16
2 files changed, 13 insertions, 13 deletions
diff --git a/bridges/test/java_remote/PolyStructTest.java b/bridges/test/java_remote/PolyStructTest.java
index affb828a80cf..bfa0aa7fe6fc 100644
--- a/bridges/test/java_remote/PolyStructTest.java
+++ b/bridges/test/java_remote/PolyStructTest.java
@@ -70,16 +70,16 @@ public final class PolyStructTest extends ComplexTestCase {
new TestPolyStruct(new Byte(Byte.MAX_VALUE))).member);
assertEquals(
- new Short((short) 0),
+ Short.valueOf((short) 0),
t.transportShort(new TestPolyStruct()).member);
assertEquals(
- new Short(Short.MIN_VALUE),
+ Short.valueOf(Short.MIN_VALUE),
t.transportShort(
- new TestPolyStruct(new Short(Short.MIN_VALUE))).member);
+ new TestPolyStruct(Short.valueOf(Short.MIN_VALUE))).member);
assertEquals(
- new Short(Short.MAX_VALUE),
+ Short.valueOf(Short.MAX_VALUE),
t.transportShort(
- new TestPolyStruct(new Short(Short.MAX_VALUE))).member);
+ new TestPolyStruct(Short.valueOf(Short.MAX_VALUE))).member);
assertEquals(
Integer.valueOf(0), t.transportLong(new TestPolyStruct()).member);
diff --git a/bridges/test/java_uno/any/TestAny.java b/bridges/test/java_uno/any/TestAny.java
index 7e1d0dc7ef50..861fc17623c5 100644
--- a/bridges/test/java_uno/any/TestAny.java
+++ b/bridges/test/java_uno/any/TestAny.java
@@ -140,31 +140,31 @@ final class TestAny {
new CompareUnboxed());
// SHORT:
- success &= testMapAny(transport, new Short((short) -32768),
+ success &= testMapAny(transport, Short.valueOf((short) -32768),
new CompareBoxed());
- success &= testMapAny(transport, new Short((short) 0),
+ success &= testMapAny(transport, Short.valueOf((short) 0),
new CompareBoxed());
- success &= testMapAny(transport, new Short((short) 32767),
+ success &= testMapAny(transport, Short.valueOf((short) 32767),
new CompareBoxed());
success &= testMapAny(transport,
new Any(Type.SHORT,
- new Short((short) -32768)),
+ Short.valueOf((short) -32768)),
new CompareUnboxed());
success &= testMapAny(transport,
- new Any(Type.SHORT, new Short((short) 0)),
+ new Any(Type.SHORT, Short.valueOf((short) 0)),
new CompareUnboxed());
success &= testMapAny(transport,
- new Any(Type.SHORT, new Short((short) 32767)),
+ new Any(Type.SHORT, Short.valueOf((short) 32767)),
new CompareUnboxed());
// UNSIGNED SHORT:
success &= testMapAny(transport,
new Any(Type.UNSIGNED_SHORT,
- new Short((short) 0)),
+ Short.valueOf((short) 0)),
new CompareBoxed());
success &= testMapAny(transport,
new Any(Type.UNSIGNED_SHORT,
- new Short((short) -32768)),
+ Short.valueOf((short) -32768)),
new CompareBoxed());
// LONG: