diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 09:52:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 12:00:34 +0100 |
commit | 41d9584179ef7b4e18eda47c2c0a955df8c087a5 (patch) | |
tree | 272551363a71f4ea34c032504cc4e058a60a91ae /qadevOOo/tests | |
parent | cb982f14796aa4dc4362bc6fde74161afa11777b (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 'qadevOOo/tests')
23 files changed, 31 insertions, 31 deletions
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java index e9e84bbb3429..865e8884d53f 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java @@ -326,7 +326,7 @@ public class _XAccessibleValue extends MultiMethodTest { return Float.valueOf((float)val); } else if (clazz.equals(Double.class)) { - return new Double(val); + return Double.valueOf(val); } else { throw new StatusException diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java index a4daa1315add..5698cab3f363 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlCurrencyFieldModel.java @@ -121,7 +121,7 @@ public class _UnoControlCurrencyFieldModel extends MultiPropertyTest { testProperty("Value", new PropertyTester() { @Override protected Object getNewValue(String prop, Object old) { - return utils.isVoid(old) ? new Double(777) : + return utils.isVoid(old) ? Double.valueOf(777) : super.getNewValue(prop, old) ; } }) ; diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java index 3538eb6afe10..4ab1a03bdfc5 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlFormattedFieldModel.java @@ -137,7 +137,7 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest { * new value must be specified. */ public void _EffectiveDefault() { - testProperty("EffectiveDefault", new Double(5.8),new Double(2.3)) ; + testProperty("EffectiveDefault", Double.valueOf(5.8),Double.valueOf(2.3)) ; } /** @@ -145,7 +145,7 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest { * new value must be specified. */ public void _EffectiveValue() { - testProperty("EffectiveValue", new Double(5.8),new Double(2.3)) ; + testProperty("EffectiveValue", Double.valueOf(5.8),Double.valueOf(2.3)) ; } /** @@ -156,7 +156,7 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest { testProperty("EffectiveMax", new PropertyTester() { @Override protected Object getNewValue(String p, Object v) { - return utils.isVoid(v) ? new Double(123.8) : + return utils.isVoid(v) ? Double.valueOf(123.8) : super.getNewValue(p,v) ; } }) ; @@ -190,7 +190,7 @@ public class _UnoControlFormattedFieldModel extends MultiPropertyTest { testProperty("EffectiveMin", new PropertyTester() { @Override protected Object getNewValue(String p, Object v) { - return utils.isVoid(v) ? new Double(0.1) : + return utils.isVoid(v) ? Double.valueOf(0.1) : super.getNewValue(p,v) ; } }) ; diff --git a/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java b/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java index 218696664d2a..f305c5823e9a 100644 --- a/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java +++ b/qadevOOo/tests/java/ifc/awt/_UnoControlNumericFieldModel.java @@ -121,7 +121,7 @@ public class _UnoControlNumericFieldModel extends MultiPropertyTest { testProperty("Value", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return utils.isVoid(old) ? new Double(234.89) : + return utils.isVoid(old) ? Double.valueOf(234.89) : super.getNewValue(p, old) ; } }) ; diff --git a/qadevOOo/tests/java/ifc/chart/_ChartAxis.java b/qadevOOo/tests/java/ifc/chart/_ChartAxis.java index 2a295c20886f..0528158b21b4 100644 --- a/qadevOOo/tests/java/ifc/chart/_ChartAxis.java +++ b/qadevOOo/tests/java/ifc/chart/_ChartAxis.java @@ -151,7 +151,7 @@ public class _ChartAxis extends MultiPropertyTest { Double ValueToSet = (Double) ValueChanger.changePValue(oldValue); double stm = ValueToSet.doubleValue(); stm = stm / 5; - return new Double(stm); + return Double.valueOf(stm); } }; diff --git a/qadevOOo/tests/java/ifc/form/component/_CurrencyField.java b/qadevOOo/tests/java/ifc/form/component/_CurrencyField.java index ae1d7de26fd4..422e447c348a 100644 --- a/qadevOOo/tests/java/ifc/form/component/_CurrencyField.java +++ b/qadevOOo/tests/java/ifc/form/component/_CurrencyField.java @@ -40,7 +40,7 @@ public class _CurrencyField extends MultiPropertyTest { testProperty("DefaultValue", new PropertyTester() { @Override protected Object getNewValue(String p, Object old) { - return util.utils.isVoid(old) ? new Double(17.5) : + return util.utils.isVoid(old) ? Double.valueOf(17.5) : super.getNewValue(p, old) ; } }) ; diff --git a/qadevOOo/tests/java/ifc/form/component/_NumericField.java b/qadevOOo/tests/java/ifc/form/component/_NumericField.java index 463e780c908f..987ba4daa327 100644 --- a/qadevOOo/tests/java/ifc/form/component/_NumericField.java +++ b/qadevOOo/tests/java/ifc/form/component/_NumericField.java @@ -40,7 +40,7 @@ public class _NumericField extends MultiPropertyTest { testProperty("DefaultValue", new PropertyTester() { @Override protected Object getNewValue(String prop, Object old) { - return util.utils.isVoid(old) ? new Double(111.11) : + return util.utils.isVoid(old) ? Double.valueOf(111.11) : super.getNewValue(prop, old) ; } }) ; diff --git a/qadevOOo/tests/java/ifc/sheet/_XCellRangeData.java b/qadevOOo/tests/java/ifc/sheet/_XCellRangeData.java index 18d8ca0f981a..6e556bbd7518 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XCellRangeData.java +++ b/qadevOOo/tests/java/ifc/sheet/_XCellRangeData.java @@ -52,7 +52,7 @@ public class _XCellRangeData extends MultiMethodTest { newData = new Object[maCRData.length][maCRData[0].length]; for (int i=0; i<newData.length; i++) { for (int j=0; j<newData[i].length; j++) { - newData[i][j] = new Double(10*i +j); + newData[i][j] = Double.valueOf(10*i +j); } } } diff --git a/qadevOOo/tests/java/mod/_forms/OCurrencyModel.java b/qadevOOo/tests/java/mod/_forms/OCurrencyModel.java index fed0b5d57e9b..5a117d1dc4ed 100644 --- a/qadevOOo/tests/java/mod/_forms/OCurrencyModel.java +++ b/qadevOOo/tests/java/mod/_forms/OCurrencyModel.java @@ -122,7 +122,7 @@ public class OCurrencyModel extends GenericModelTest { super.m_propertiesToSet.add(myProp); super.m_ChangePropertyName = "Value"; - super.m_ChangePropertyValue = new Double(0); + super.m_ChangePropertyValue = Double.valueOf(0); super.m_LCShape_Type = "FixedText"; diff --git a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java index 71a26c0eea32..66e46427f62d 100644 --- a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java +++ b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java @@ -594,7 +594,7 @@ public class ODatabaseForm extends TestCase { params.add(Integer.valueOf(12345)) ; params.add(Long.valueOf(23456)) ; params.add(Float.valueOf(1.234f)) ; - params.add(new Double(2.345)) ; + params.add(Double.valueOf(2.345)) ; params.add(new byte[] {1, 2, 3}) ; Date d = new Date(); d.Day = 26; d.Month = 1; d.Year = 2001; diff --git a/qadevOOo/tests/java/mod/_sc/ScCellRangeObj.java b/qadevOOo/tests/java/mod/_sc/ScCellRangeObj.java index c37e04015c31..a4cbdeb5499c 100644 --- a/qadevOOo/tests/java/mod/_sc/ScCellRangeObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScCellRangeObj.java @@ -183,7 +183,7 @@ public class ScCellRangeObj extends TestCase { /* Object[][] newData = new Object[5][4]; for (int i=0; i<newData.length; i++) { for (int j=0; j<newData[i].length; j++) { - newData[i][j] = new Double(i*10+j); + newData[i][j] = Double.valueOf(i*10+j); } } tEnv.addObjRelation("NewData", newData); */ diff --git a/qadevOOo/tests/java/mod/_stm/DataInputStream.java b/qadevOOo/tests/java/mod/_stm/DataInputStream.java index 73213f0fc5e2..bbb9579a67c4 100644 --- a/qadevOOo/tests/java/mod/_stm/DataInputStream.java +++ b/qadevOOo/tests/java/mod/_stm/DataInputStream.java @@ -116,7 +116,7 @@ public class DataInputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_stm/DataOutputStream.java b/qadevOOo/tests/java/mod/_stm/DataOutputStream.java index fba607c63d34..10a93b29745b 100644 --- a/qadevOOo/tests/java/mod/_stm/DataOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/DataOutputStream.java @@ -105,7 +105,7 @@ public class DataOutputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java b/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java index a71b2016821f..214d294561d6 100644 --- a/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java @@ -128,7 +128,7 @@ public class MarkableOutputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java b/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java index 91ec8ddc88f2..c8e6ad8fd797 100644 --- a/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java +++ b/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java @@ -217,7 +217,7 @@ public class ObjectInputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java b/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java index 5fd361273d81..014f1b6da493 100644 --- a/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java @@ -209,7 +209,7 @@ public class ObjectOutputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java b/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java index a07c7fe903b1..c237efcb6ebb 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/DataInputStream.java @@ -115,7 +115,7 @@ public class DataInputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java b/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java index 07ea9bfac002..4acded624c99 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/DataOutputStream.java @@ -104,7 +104,7 @@ public class DataOutputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java b/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java index a3b461f3d286..0aa943ce5889 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/MarkableOutputStream.java @@ -127,7 +127,7 @@ public class MarkableOutputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java b/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java index de91ef8a07af..7f82f51474d3 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/ObjectInputStream.java @@ -223,7 +223,7 @@ public class ObjectInputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java b/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java index 492cfaccb6a0..f0416a37adfc 100644 --- a/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java +++ b/qadevOOo/tests/java/mod/_streams/uno/ObjectOutputStream.java @@ -208,7 +208,7 @@ public class ObjectOutputStream extends TestCase { data.add(Short.valueOf((short)1234)) ; data.add(Integer.valueOf(123456)) ; data.add(Float.valueOf(1.234f)) ; - data.add(new Double(1.23456)) ; + data.add(Double.valueOf(1.23456)) ; data.add("DataInputStream") ; // information for writing to the pipe byte[] byteData = new byte[] { diff --git a/qadevOOo/tests/java/mod/_sw/SwXCellRange.java b/qadevOOo/tests/java/mod/_sw/SwXCellRange.java index 7b60a1f6c770..9a9d271ab551 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXCellRange.java +++ b/qadevOOo/tests/java/mod/_sw/SwXCellRange.java @@ -115,15 +115,15 @@ public class SwXCellRange extends TestCase { Object[][] NewData = new Object[5][]; NewData[0] = new Double[] - {new Double(2.5),new Double(5),new Double(2.5),new Double(5)}; + {Double.valueOf(2.5),Double.valueOf(5),Double.valueOf(2.5),Double.valueOf(5)}; NewData[1] = new Double[] - {new Double(4),new Double(9),new Double(2.5),new Double(5)}; + {Double.valueOf(4),Double.valueOf(9),Double.valueOf(2.5),Double.valueOf(5)}; NewData[2] = new Double[] - {new Double(2.5),new Double(5),new Double(2.5),new Double(5)}; + {Double.valueOf(2.5),Double.valueOf(5),Double.valueOf(2.5),Double.valueOf(5)}; NewData[3] = new Double[] - {new Double(2.5),new Double(5),new Double(2.5),new Double(5)}; + {Double.valueOf(2.5),Double.valueOf(5),Double.valueOf(2.5),Double.valueOf(5)}; NewData[4] = new Double[] - {new Double(4),new Double(9),new Double(2.5),new Double(5)}; + {Double.valueOf(4),Double.valueOf(9),Double.valueOf(2.5),Double.valueOf(5)}; tEnv.addObjRelation("NewData",NewData); // com::sun::star::chart::XChartDataArray diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextTable.java b/qadevOOo/tests/java/mod/_sw/SwXTextTable.java index 2ff21ff52e45..fe44aaccdd96 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTextTable.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTextTable.java @@ -112,8 +112,8 @@ public class SwXTextTable extends TestCase { //Adding ObjRelation for XCellRangeData Object[][] newData = new Object[6][]; Object[] line = new Object[2]; - line[0] = new Double(1.5); - line[1] = new Double(2.5); + line[0] = Double.valueOf(1.5); + line[1] = Double.valueOf(2.5); newData[0] = line; newData[1] = line; newData[2] = line; |