diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-12 14:00:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-19 14:57:16 +0200 |
commit | be1bb7b1ccee28be616b89cc95e97d656e78bbe3 (patch) | |
tree | d67d16a68d1469b5096a27c743c4b0326a0c0ebe /javaunohelper/com | |
parent | java: classes in java.lang package do not need to be fully qualified (diff) | |
download | core-be1bb7b1ccee28be616b89cc95e97d656e78bbe3.tar.gz core-be1bb7b1ccee28be616b89cc95e97d656e78bbe3.zip |
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.java | 4 | ||||
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/helper/PropertySetMixin.java | 6 |
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")); |