summaryrefslogtreecommitdiff
path: root/ridljar
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 15:09:06 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:17 +0200
commitff0ad0493ee1729c726587f667761b04101d774c (patch)
tree8c0f97e8740fbdb2ed0cdbfc5d99d82cae8f7df6 /ridljar
parentbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (diff)
java: use 'Integer.valueOf' instead of 'new Integer'
Change-Id: Ia8befb8d69914ce971174fc5f2ffc0e2f506a940
Diffstat (limited to 'ridljar')
-rw-r--r--ridljar/com/sun/star/uno/UnoRuntime.java2
-rw-r--r--ridljar/test/com/sun/star/uno/Any_Test.java2
-rw-r--r--ridljar/test/com/sun/star/uno/UnoRuntime_Test.java10
3 files changed, 7 insertions, 7 deletions
diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java
index 28e79cbb4089..2717dfb4666d 100644
--- a/ridljar/com/sun/star/uno/UnoRuntime.java
+++ b/ridljar/com/sun/star/uno/UnoRuntime.java
@@ -312,7 +312,7 @@ public class UnoRuntime {
return new Short((short) 0);
case TypeClass.LONG_value:
case TypeClass.UNSIGNED_LONG_value:
- return new Integer(0);
+ return Integer.valueOf(0);
case TypeClass.HYPER_value:
case TypeClass.UNSIGNED_HYPER_value:
return new Long(0L);
diff --git a/ridljar/test/com/sun/star/uno/Any_Test.java b/ridljar/test/com/sun/star/uno/Any_Test.java
index 28684d630bfb..9ecde9e5388e 100644
--- a/ridljar/test/com/sun/star/uno/Any_Test.java
+++ b/ridljar/test/com/sun/star/uno/Any_Test.java
@@ -35,7 +35,7 @@ public final class Any_Test {
@Test public void testComplete() {
assertSame(Any.VOID, Any.complete(Any.VOID));
assertEquals(
- new Any(Type.LONG, new Integer(10)), Any.complete(new Integer(10)));
+ new Any(Type.LONG, Integer.valueOf(10)), Any.complete(Integer.valueOf(10)));
assertEquals(
new Any(new Type(XInterface.class), null), Any.complete(null));
XInterface x = new XInterface() {};
diff --git a/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java b/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java
index 5992eda802b2..e92422ffa1e4 100644
--- a/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java
+++ b/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java
@@ -57,11 +57,11 @@ public final class UnoRuntime_Test {
@Test public void test_areSame() {
assertTrue(
UnoRuntime.areSame(
- new Any(Type.UNSIGNED_LONG, new Integer(3)),
- new Any(Type.UNSIGNED_LONG, new Integer(3))));
+ new Any(Type.UNSIGNED_LONG, Integer.valueOf(3)),
+ new Any(Type.UNSIGNED_LONG, Integer.valueOf(3))));
assertFalse(
UnoRuntime.areSame(
- new Any(Type.UNSIGNED_LONG, new Integer(3)), new Integer(3)));
+ new Any(Type.UNSIGNED_LONG, Integer.valueOf(3)), Integer.valueOf(3)));
assertFalse(UnoRuntime.areSame(new int[] { 1 }, new int[] { 1, 2 }));
assertTrue(
UnoRuntime.areSame(
@@ -74,7 +74,7 @@ public final class UnoRuntime_Test {
new Optional<Integer>()),
new Any(
new Type("com.sun.star.beans.Optional<unsigned long>"),
- new Optional<Integer>(false, new Integer(0)))));
+ new Optional<Integer>(false, Integer.valueOf(0)))));
assertFalse(UnoRuntime.areSame(new Test1(), new Test2()));
Test2 test2 = new Test2();
assertTrue(
@@ -86,7 +86,7 @@ public final class UnoRuntime_Test {
@SuppressWarnings("rawtypes")
@Test public void test_completeValue() {
assertEquals(
- new Integer(0), UnoRuntime.completeValue(Type.UNSIGNED_LONG, null));
+ Integer.valueOf(0), UnoRuntime.completeValue(Type.UNSIGNED_LONG, null));
Object v = UnoRuntime.completeValue(
new Type("[][]unsigned long"), null);
assertTrue(v instanceof int[][]);