summaryrefslogtreecommitdiff
path: root/jurt/test
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 /jurt/test
parent8a2c6c29af41cd7a62f37861fb0d4e81a857bb45 (diff)
java: use 'Short.valueOf' instead of 'new Short'
Change-Id: Icef19ef61ee0af2dd3bda527263934006271f219
Diffstat (limited to 'jurt/test')
-rw-r--r--jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java2
-rw-r--r--jurt/test/com/sun/star/uno/AnyConverter_Test.java10
2 files changed, 6 insertions, 6 deletions
diff --git a/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java b/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
index c5498dea1ae8..ef4a4da49a65 100644
--- a/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
+++ b/jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
@@ -59,7 +59,7 @@ public final class Marshaling_Test {
Integer.valueOf(0xff0000),
Integer.valueOf(0xff000000),
Long.valueOf(666L),
- new Short((short)444),
+ Short.valueOf((short)444),
new String("blabla"),
Integer.valueOf(10), // Any as object
Integer.valueOf(10), // Any as object
diff --git a/jurt/test/com/sun/star/uno/AnyConverter_Test.java b/jurt/test/com/sun/star/uno/AnyConverter_Test.java
index 3a0c77723a4d..b8be66d71760 100644
--- a/jurt/test/com/sun/star/uno/AnyConverter_Test.java
+++ b/jurt/test/com/sun/star/uno/AnyConverter_Test.java
@@ -40,7 +40,7 @@ public final class AnyConverter_Test {
Boolean aBool= Boolean.TRUE;
Character aChar= new Character('A');
Byte aByte= new Byte((byte) 111);
- Short aShort= new Short((short) 11111);
+ Short aShort= Short.valueOf((short) 11111);
Integer aInt= Integer.valueOf( 1111111);
Long aLong= Long.valueOf( 0xffffffff);
Float aFloat= new Float( 3.14);
@@ -242,7 +242,7 @@ public final class AnyConverter_Test {
assertEquals(sh, ((Byte)anyByte.getObject()).byteValue());
sh= AnyConverter.toShort(anyShort);
assertEquals(sh, ((Short) anyShort.getObject()).shortValue());
- Any a = new Any( Type.UNSIGNED_SHORT, new Short((short)5) );
+ Any a = new Any( Type.UNSIGNED_SHORT, Short.valueOf((short)5) );
assertEquals(5, AnyConverter.toUnsignedShort( a ));
// must fail
@@ -312,7 +312,7 @@ public final class AnyConverter_Test {
assertEquals(val, ((Short) anyShort.getObject()).shortValue());
val= AnyConverter.toInt(anyInt);
assertEquals(val, ((Integer) anyInt.getObject()).intValue());
- Any a = new Any( Type.UNSIGNED_SHORT, new Short((short)5) );
+ Any a = new Any( Type.UNSIGNED_SHORT, Short.valueOf((short)5) );
assertEquals(5, AnyConverter.toInt(a));
assertEquals(5, AnyConverter.toUnsignedInt(a));
a = new Any( Type.UNSIGNED_LONG, Integer.valueOf(5) );
@@ -383,7 +383,7 @@ public final class AnyConverter_Test {
assertEquals(val, ((Integer) anyInt.getObject()).intValue());
val= AnyConverter.toLong(anyLong);
assertEquals(val, ((Long) anyLong.getObject()).longValue());
- Any a = new Any( Type.UNSIGNED_SHORT, new Short((short)5) );
+ Any a = new Any( Type.UNSIGNED_SHORT, Short.valueOf((short)5) );
assertEquals(5, AnyConverter.toLong(a));
assertEquals(5, AnyConverter.toUnsignedLong(a));
a = new Any( Type.UNSIGNED_LONG, Integer.valueOf(5) );
@@ -797,7 +797,7 @@ public final class AnyConverter_Test {
assertTrue(AnyConverter.isShort(aShort));
assertTrue(AnyConverter.isShort(anyShort));
assertEquals(Type.SHORT, AnyConverter.getType(anyShort));
- Any a = new Any( Type.UNSIGNED_SHORT, new Short((short)5) );
+ Any a = new Any( Type.UNSIGNED_SHORT, Short.valueOf((short)5) );
assertEquals(Type.UNSIGNED_SHORT, AnyConverter.getType(a));
assertFalse(AnyConverter.isShort(a));
assertFalse(Type.SHORT.equals(AnyConverter.getType(a)));