diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:19:51 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-20 10:35:53 +0200 |
commit | 60f152caeee38579433a31dd3a98e91dc3d23ff6 (patch) | |
tree | 15ba69f938e09bb173ca7de2e1b21b62e740ea40 /bean | |
parent | 2922a967a1da5f9c0a07b5390906307d0ae6fe48 (diff) |
java: avoid unnecessary comparisons in boolean expressions
i.e. stuff like "x == true"
Change-Id: Ib82a4a30e736df392405332fa197b588482cffcf
Diffstat (limited to 'bean')
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 2 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/OOoBean.java | 4 | ||||
-rw-r--r-- | bean/qa/complex/bean/WriterFrame.java | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index 491bd0865bbd..bfcbd94b36f0 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -234,7 +234,7 @@ public class LocalOfficeConnection public void dispose() { Iterator<XEventListener> itr = mComponents.iterator(); - while (itr.hasNext() == true) { + while (itr.hasNext()) { // ignore runtime exceptions in dispose try { itr.next().disposing(null); } catch ( RuntimeException aExc ) {} diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java index 9bbf6ad07e6e..3c2c17e2ac3a 100644 --- a/bean/com/sun/star/comp/beans/OOoBean.java +++ b/bean/com/sun/star/comp/beans/OOoBean.java @@ -582,7 +582,7 @@ public class OOoBean { if ( aFrame != null && xOldController != null ) - if (xOldController.suspend(true) == false) + if (!xOldController.suspend(true)) throw new com.sun.star.util.CloseVetoException( "Dokument is still being used and cannot be closed.", this); @@ -1187,7 +1187,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar"); // continue to trying to connect the OOo instance long n = 0; - while ( isInterrupted() == false + while ( !isInterrupted() && iConnection != null && iConnection.getComponentContext() != null ) { diff --git a/bean/qa/complex/bean/WriterFrame.java b/bean/qa/complex/bean/WriterFrame.java index e4700445d8bf..9c0eb7d6c98d 100644 --- a/bean/qa/complex/bean/WriterFrame.java +++ b/bean/qa/complex/bean/WriterFrame.java @@ -42,7 +42,7 @@ class WriterFrame extends java.awt.Frame try { - if (loadBeforeVisible == false) + if (!loadBeforeVisible) { m_bean = new com.sun.star.comp.beans.OOoBean(new PrivateLocalOfficeConnection(_xConn)); add(m_bean, BorderLayout.CENTER); |