From 60f152caeee38579433a31dd3a98e91dc3d23ff6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 13 Aug 2014 10:19:51 +0200 Subject: java: avoid unnecessary comparisons in boolean expressions i.e. stuff like "x == true" Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf --- javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java | 6 +++--- javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'javaunohelper/com/sun/star/lib') diff --git a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java index caf5cdc9b2f3..650be99c87c3 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/InterfaceContainer.java @@ -314,7 +314,7 @@ public class InterfaceContainer implements Cloneable while (it.hasNext()) { Object obj= it.next(); - if (false == contains(obj)) + if (!contains(obj)) { retVal= false; break; @@ -556,7 +556,7 @@ public class InterfaceContainer implements Cloneable break; } } - if (bExists == false) + if (!bExists) { itColl= collection.iterator(); while (itColl.hasNext()) @@ -572,7 +572,7 @@ public class InterfaceContainer implements Cloneable } } } - if (bExists == true) + if (bExists) arRetained[indexRetained++]= curElem; } retVal= size != indexRetained; diff --git a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java index ca72af9c81ac..227dcdeff26e 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/PropertySet.java @@ -264,7 +264,7 @@ XMultiPropertySet */ protected void assignPropertyId(Property prop, Object id) { - if (id instanceof String && ((String) id).equals("") == false) + if (id instanceof String && !((String) id).equals("")) _propertyToIdMap.put(prop, id); } -- cgit