summaryrefslogtreecommitdiff
path: root/ridljar/com/sun
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 09:52:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-11-02 12:00:34 +0100
commit41d9584179ef7b4e18eda47c2c0a955df8c087a5 (patch)
tree272551363a71f4ea34c032504cc4e058a60a91ae /ridljar/com/sun
parentcb982f14796aa4dc4362bc6fde74161afa11777b (diff)
'new Double' is deprecated in Java
replace with Double.valueOf Change-Id: If5be8e500e31ebf9d5fb20ea7dd474677d7c74ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158785 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.java4
-rw-r--r--ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java2
-rw-r--r--ridljar/com/sun/star/uno/AnyConverter.java8
-rw-r--r--ridljar/com/sun/star/uno/UnoRuntime.java2
4 files changed, 8 insertions, 8 deletions
diff --git a/ridljar/com/sun/star/lib/uno/helper/PropertySet.java b/ridljar/com/sun/star/lib/uno/helper/PropertySet.java
index ea89e102b836..2d9fadf5101a 100644
--- a/ridljar/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/ridljar/com/sun/star/lib/uno/helper/PropertySet.java
@@ -749,7 +749,7 @@ XMultiPropertySet
else if (cl.equals(float.class))
retVal= Float.valueOf(AnyConverter.toFloat(obj));
else if (cl.equals(double.class))
- retVal= new Double(AnyConverter.toDouble(obj));
+ retVal= Double.valueOf(AnyConverter.toDouble(obj));
else if (cl.equals(String.class))
retVal= AnyConverter.toString(obj);
else if (cl.isArray())
@@ -771,7 +771,7 @@ XMultiPropertySet
else if (cl.equals(Float.class))
retVal= Float.valueOf(AnyConverter.toFloat(obj));
else if (cl.equals(Double.class))
- retVal= new Double(AnyConverter.toDouble(obj));
+ retVal= Double.valueOf(AnyConverter.toDouble(obj));
else if (XInterface.class.isAssignableFrom(cl))
retVal= AnyConverter.toObject(new Type(cl), obj);
else if (com.sun.star.uno.Enum.class.isAssignableFrom(cl))
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 bf820729c2c9..40d5fb3ee02c 100644
--- a/ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
+++ b/ridljar/com/sun/star/lib/uno/protocols/urp/Unmarshal.java
@@ -259,7 +259,7 @@ final class Unmarshal {
}
private Double readDoubleValue() throws IOException {
- return new Double(input.readDouble());
+ return Double.valueOf(input.readDouble());
}
private Character readCharValue() throws IOException {
diff --git a/ridljar/com/sun/star/uno/AnyConverter.java b/ridljar/com/sun/star/uno/AnyConverter.java
index e44425d71999..b37eab254e76 100644
--- a/ridljar/com/sun/star/uno/AnyConverter.java
+++ b/ridljar/com/sun/star/uno/AnyConverter.java
@@ -609,13 +609,13 @@ public class AnyConverter
case TypeClass.DOUBLE_value:
switch (tc) {
case TypeClass.BYTE_value:
- return new Double( ((Byte)object).byteValue() );
+ return Double.valueOf( ((Byte)object).byteValue() );
case TypeClass.SHORT_value:
- return new Double( ((Short)object).shortValue() );
+ return Double.valueOf( ((Short)object).shortValue() );
case TypeClass.LONG_value:
- return new Double( ((Integer)object).intValue() );
+ return Double.valueOf( ((Integer)object).intValue() );
case TypeClass.FLOAT_value:
- return new Double( ((Float)object).floatValue() );
+ return Double.valueOf( ((Float)object).floatValue() );
case TypeClass.DOUBLE_value:
return object;
}
diff --git a/ridljar/com/sun/star/uno/UnoRuntime.java b/ridljar/com/sun/star/uno/UnoRuntime.java
index a054b406fe79..d4cf86424907 100644
--- a/ridljar/com/sun/star/uno/UnoRuntime.java
+++ b/ridljar/com/sun/star/uno/UnoRuntime.java
@@ -334,7 +334,7 @@ public class UnoRuntime {
case TypeClass.FLOAT_value:
return Float.valueOf(0.0f);
case TypeClass.DOUBLE_value:
- return new Double(0.0);
+ return Double.valueOf(0.0);
case TypeClass.CHAR_value:
return new Character('\u0000');
case TypeClass.STRING_value: