From 4b4bff34027cca49fd13e82d33d1b399848838fa Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 12 Aug 2014 15:27:21 +0200 Subject: java: no need to instantiate String objects directly Change-Id: I7610774c94bf673ed3b574ffce04c4ee6ca93c03 --- jurt/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java | 4 ++-- jurt/test/com/sun/star/uno/AnyConverter_Test.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'jurt') 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 39f8e8b2a3cd..17551bade8ab 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 @@ -60,7 +60,7 @@ public final class Marshaling_Test { Integer.valueOf(0xff000000), Long.valueOf(666L), Short.valueOf((short)444), - new String("blabla"), + "blabla", Integer.valueOf(10), // Any as object Integer.valueOf(10), // Any as object new Any(new Type(Integer.class), Integer.valueOf(10)), // Any as Any @@ -70,7 +70,7 @@ public final class Marshaling_Test { x, new byte[]{1,2,3,4,5,6,7}, // primitive sequence new int[]{7,6,5,4,3,2,1}, // primitive sequence - new Object[]{Integer.valueOf(123), new String("hallo")}, // any sequence + new Object[]{Integer.valueOf(123), "hallo"}, // any sequence new TestPrimitiveStruct[]{new TestPrimitiveStruct(), new TestPrimitiveStruct()}, // sequence of primitive structs new TestPrimitiveSeqStruct[]{new TestPrimitiveSeqStruct(), new TestPrimitiveSeqStruct()}, // sequence of primitive structs new TestNestedStruct(), diff --git a/jurt/test/com/sun/star/uno/AnyConverter_Test.java b/jurt/test/com/sun/star/uno/AnyConverter_Test.java index 0900eeaf64e6..eb55ae1a0fe5 100644 --- a/jurt/test/com/sun/star/uno/AnyConverter_Test.java +++ b/jurt/test/com/sun/star/uno/AnyConverter_Test.java @@ -46,7 +46,7 @@ public final class AnyConverter_Test { Float aFloat= new Float( 3.14); Double aDouble= new Double( 3.145); Object aObj= new ATypeProvider(); - String aStr= new String("I am a string"); + String aStr= "I am a string"; Type aType= new Type(String.class); byte[] arByte= new byte[] {1,2,3}; -- cgit v1.2.3