summaryrefslogtreecommitdiff
path: root/ridljar
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 09:54:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 14:47:25 +0100
commit00e1ac51e6d6185cba0b677587b03e1a94b26a87 (patch)
tree7f13dafc979639f31a20e13e920eff34689befe7 /ridljar
parent30877bdc01d3a9cda1878f66ca7a84760f5f8c67 (diff)
'new Character' is deprecated in Java
replace with Character.valueOf Change-Id: I9938db0fce6490eba6f4900efc3c139a1b71d120 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158786 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ridljar')
-rw-r--r--ridljar/com/sun/star/lib/uno/helper/PropertySet.java4
-rw-r--r--ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java2
-rw-r--r--ridljar/com/sun/star/uno/UnoRuntime.java2
-rw-r--r--ridljar/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java2
-rw-r--r--ridljar/test/com/sun/star/uno/AnyConverter_Test.java2
5 files changed, 6 insertions, 6 deletions
diff --git a/ridljar/com/sun/star/lib/uno/helper/PropertySet.java b/ridljar/com/sun/star/lib/uno/helper/PropertySet.java
index 2d9fadf5101a..dec51b9b08fe 100644
--- a/ridljar/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/ridljar/com/sun/star/lib/uno/helper/PropertySet.java
@@ -737,7 +737,7 @@ XMultiPropertySet
else if(cl.equals(boolean.class))
retVal= Boolean.valueOf(AnyConverter.toBoolean(obj));
else if (cl.equals(char.class))
- retVal= new Character(AnyConverter.toChar(obj));
+ retVal= Character.valueOf(AnyConverter.toChar(obj));
else if (cl.equals(byte.class))
retVal= Byte.valueOf(AnyConverter.toByte(obj));
else if (cl.equals(short.class))
@@ -759,7 +759,7 @@ XMultiPropertySet
else if (cl.equals(Boolean.class))
retVal= Boolean.valueOf(AnyConverter.toBoolean(obj));
else if (cl.equals(Character.class))
- retVal= new Character(AnyConverter.toChar(obj));
+ retVal= Character.valueOf(AnyConverter.toChar(obj));
else if (cl.equals(Byte.class))
retVal= Byte.valueOf(AnyConverter.toByte(obj));
else if (cl.equals(Short.class))
diff --git a/ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java b/ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
index 40d5fb3ee02c..af37838fbca3 100644
--- a/ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
+++ b/ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
@@ -263,7 +263,7 @@ final class Unmarshal {
}
private Character readCharValue() throws IOException {
- return new Character(input.readChar());
+ return Character.valueOf(input.readChar());
}
private String readStringValue() throws IOException {
diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java
index d4cf86424907..9c2eedbd4e32 100644
--- a/ridljar/com/sun/star/uno/UnoRuntime.java
+++ b/ridljar/com/sun/star/uno/UnoRuntime.java
@@ -336,7 +336,7 @@ public class UnoRuntime {
case TypeClass.DOUBLE_value:
return Double.valueOf(0.0);
case TypeClass.CHAR_value:
- return new Character('\u0000');
+ return Character.valueOf('\u0000');
case TypeClass.STRING_value:
return "";
case TypeClass.TYPE_value:
diff --git a/ridljar/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java b/ridljar/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
index 6ffc7577d145..4a6c93652e2d 100644
--- a/ridljar/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
+++ b/ridljar/test/com/sun/star/lib/uno/protocols/urp/Marshaling_Test.java
@@ -46,7 +46,7 @@ public final class Marshaling_Test {
new com.sun.star.uno.Exception("testException"),
Boolean.TRUE,
Byte.valueOf((byte)47),
- new Character('k'),
+ Character.valueOf('k'),
Double.valueOf(0.12345),
TestEnum.B,
Float.valueOf(0.5678f),
diff --git a/ridljar/test/com/sun/star/uno/AnyConverter_Test.java b/ridljar/test/com/sun/star/uno/AnyConverter_Test.java
index 5f045315db08..193d86baf2d5 100644
--- a/ridljar/test/com/sun/star/uno/AnyConverter_Test.java
+++ b/ridljar/test/com/sun/star/uno/AnyConverter_Test.java
@@ -56,7 +56,7 @@ public final class AnyConverter_Test {
@Before public void setUp()
{
aBool= Boolean.TRUE;
- aChar= new Character('A');
+ aChar= Character.valueOf('A');
aByte= Byte.valueOf((byte) 111);
aShort= Short.valueOf((short) 11111);
aInt= Integer.valueOf( 1111111);