diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 09:54:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 14:47:25 +0100 |
commit | 00e1ac51e6d6185cba0b677587b03e1a94b26a87 (patch) | |
tree | 7f13dafc979639f31a20e13e920eff34689befe7 /ridljar/com/sun | |
parent | 30877bdc01d3a9cda1878f66ca7a84760f5f8c67 (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/com/sun')
-rw-r--r-- | ridljar/com/sun/star/lib/uno/helper/PropertySet.java | 4 | ||||
-rw-r--r-- | ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java | 2 | ||||
-rw-r--r-- | ridljar/com/sun/star/uno/UnoRuntime.java | 2 |
3 files changed, 4 insertions, 4 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: |