summaryrefslogtreecommitdiff
path: root/javaunohelper/com
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-08-12 14:00:54 +0200
committerNoel Grandin <noel@peralex.com>2014-08-19 14:57:16 +0200
commitbe1bb7b1ccee28be616b89cc95e97d656e78bbe3 (patch)
treed67d16a68d1469b5096a27c743c4b0326a0c0ebe /javaunohelper/com
parent56ef5533fc1bce2134721ae64d4d6c18a3526a7a (diff)
java: use Boolean.valueOf instead of instantiating Boolean objects
Change-Id: Ie41d6b0170a035a694dd270c311a137fd1810e74
Diffstat (limited to 'javaunohelper/com')
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java4
-rw-r--r--javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
index 514d2a5ea028..86d4107072de 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java
@@ -731,7 +731,7 @@ XMultiPropertySet
retVal= obj;
}
else if(cl.equals(boolean.class))
- retVal= new Boolean(AnyConverter.toBoolean(obj));
+ retVal= Boolean.valueOf(AnyConverter.toBoolean(obj));
else if (cl.equals(char.class))
retVal= new Character(AnyConverter.toChar(obj));
else if (cl.equals(byte.class))
@@ -753,7 +753,7 @@ XMultiPropertySet
else if (cl.equals(Type.class))
retVal= AnyConverter.toType(obj);
else if (cl.equals(Boolean.class))
- retVal= new Boolean(AnyConverter.toBoolean(obj));
+ retVal= Boolean.valueOf(AnyConverter.toBoolean(obj));
else if (cl.equals(Character.class))
retVal= new Character(AnyConverter.toChar(obj));
else if (cl.equals(Byte.class))
diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
index ca03a7cbf9a2..e66167fda900 100644
--- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
+++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java
@@ -894,7 +894,7 @@ public final class PropertySetMixin {
isDefaulted, wrapOptional));
UnoRuntime.queryInterface(
XIdlField2.class, type.getField("IsAmbiguous")).set(
- strct, new Boolean(isAmbiguous));
+ strct, Boolean.valueOf(isAmbiguous));
} catch (com.sun.star.lang.IllegalArgumentException e) {
throw new RuntimeException(
"unexpected com.sun.star.lang.IllegalArgumentException: "
@@ -921,7 +921,7 @@ public final class PropertySetMixin {
false, false, wrapOptional));
UnoRuntime.queryInterface(
XIdlField2.class, type.getField("IsDefaulted")).set(
- strct, new Boolean(isDefaulted));
+ strct, Boolean.valueOf(isDefaulted));
} catch (com.sun.star.lang.IllegalArgumentException e) {
throw new RuntimeException(
"unexpected com.sun.star.lang.IllegalArgumentException: "
@@ -941,7 +941,7 @@ public final class PropertySetMixin {
try {
UnoRuntime.queryInterface(
XIdlField2.class, type.getField("IsPresent")).set(
- strct, new Boolean(present));
+ strct, Boolean.valueOf(present));
if (present) {
XIdlField2 field = UnoRuntime.queryInterface(
XIdlField2.class, type.getField("Value"));