diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 09:47:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-11-02 12:00:24 +0100 |
commit | cb982f14796aa4dc4362bc6fde74161afa11777b (patch) | |
tree | 58267840e3cc2a2d6e344337fe3d735063900711 /javaunohelper/test/com | |
parent | a71da3b7a80ca32b595a8ca0ea3da650b0af376c (diff) |
'new Float' is deprecated in Java
replace with Float.valueOf
Change-Id: Ib6408b24dac2953789d0ec67e73b8be8aefca252
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158784
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'javaunohelper/test/com')
-rw-r--r-- | javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java index 41149ba61a18..4943df7d29f8 100644 --- a/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java +++ b/javaunohelper/test/com/sun/star/lib/uno/helper/PropertySet_Test.java @@ -96,7 +96,7 @@ public class PropertySet_Test cl.setPropertyValue("PropLongA", value); assertEquals(cl.getPropertyValue("PropLongA"), value); - value= new Float(3.14); + value= Float.valueOf(3.14f); cl.setPropertyValue("PropFloatA", value); assertEquals(cl.getPropertyValue("PropFloatA"), value); @@ -169,7 +169,7 @@ public class PropertySet_Test cl.setPropertyValue("PropObjectA", value); assertEquals(cl.getPropertyValue("PropObjectA"), value); - value= new Float(3.14); + value= Float.valueOf(3.14f); cl.setPropertyValue("PropObjectA", value); assertEquals(cl.getPropertyValue("PropObjectA"), value); @@ -238,7 +238,7 @@ public class PropertySet_Test assertTrue(ret instanceof Any); assertTrue(util.anyEquals(value, ret)); - value= new Float(3.14); + value= Float.valueOf(3.14f); cl.setPropertyValue("PropAnyA", value); ret= cl.getPropertyValue("PropAnyA"); assertTrue(ret instanceof Any); @@ -318,7 +318,7 @@ public class PropertySet_Test assertTrue(ret instanceof Long); assertTrue(util.anyEquals(value, ret)); - value= new Any(new Type(float.class), new Float(3.14)); + value= new Any(new Type(float.class), Float.valueOf(3.14f)); cl.setPropertyValue("PropFloatA", value); ret= cl.getPropertyValue("PropFloatA"); assertTrue(ret instanceof Float); @@ -398,7 +398,7 @@ public class PropertySet_Test assertTrue(ret instanceof Any); assertTrue(util.anyEquals(value, ret)); - value= new Any(new Type(float.class), new Float(3.14)); + value= new Any(new Type(float.class), Float.valueOf(3.14f)); cl.setPropertyValue("PropAnyA", value); ret= cl.getPropertyValue("PropAnyA"); assertTrue(ret instanceof Any); @@ -466,7 +466,7 @@ public class PropertySet_Test cl.setPropertyValue("PropLongClass", value); assertEquals(cl.getPropertyValue("PropLongClass"), value); - value= new Float(3.14); + value= Float.valueOf(3.14f); cl.setPropertyValue("PropFloatClass", value); assertEquals(cl.getPropertyValue("PropFloatClass"), value); @@ -514,7 +514,7 @@ public class PropertySet_Test assertTrue(ret instanceof Long); assertTrue(util.anyEquals(value, ret)); - value= new Any(new Type(float.class), new Float(3.14)); + value= new Any(new Type(float.class), Float.valueOf(3.14f)); cl.setPropertyValue("PropFloatClass", value); ret= cl.getPropertyValue("PropFloatClass"); assertTrue(ret instanceof Float); @@ -1197,7 +1197,7 @@ class TestClass extends PropertySet assertTrue(outNewVal[0] instanceof Long); assertEquals(outNewVal[0], value); - value= new Float(3.14); + value= Float.valueOf(3.14f); assertTrue(convertPropertyValue(propFloatA, outNewVal, outOldVal, value)); assertTrue(outNewVal[0] instanceof Float); assertEquals(outNewVal[0], value); @@ -1353,7 +1353,7 @@ class TestClass extends PropertySet assertTrue(outNewVal[0] instanceof Long); assertEquals(outNewVal[0], value); - value= new Float(3.14); + value= Float.valueOf(3.14f); assertTrue(convertPropertyValue(propFloatClass, outNewVal, outOldVal, value)); assertTrue(outNewVal[0] instanceof Float); assertEquals(outNewVal[0], value); @@ -1392,7 +1392,7 @@ class TestClass extends PropertySet setPropertyValueNoBroadcast(propLongA, value); assertEquals(longPropA, ((Long) value).longValue()); - value= new Float(3.14); + value= Float.valueOf(3.14f); setPropertyValueNoBroadcast(propFloatA, value); assertEquals(floatPropA, ((Float) value).floatValue(), 0.0f); |