diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-15 16:25:10 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-16 08:15:52 +0200 |
commit | fa22664be218c211c41342c6296616c316b2c3b1 (patch) | |
tree | 2118e12dffce57f5027ef4aed227d27acf8c6ed6 /javaunohelper/com | |
parent | 94ae3e827b71da5be77ff04522ff156770801b25 (diff) |
java: always use braces for while loops
Change-Id: Iff896b0cace8b8305528b3b0140004ea856169ce
Diffstat (limited to 'javaunohelper/com')
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java | 3 | ||||
-rw-r--r-- | javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java index 9ebcb0684894..f8e738d0d8f8 100644 --- a/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java +++ b/javaunohelper/com/sun/star/lib/uno/adapter/XOutputStreamToByteArrayAdapter.java @@ -87,8 +87,9 @@ public final class XOutputStreamToByteArrayAdapter { if ( externalBuffer ) throw new BufferSizeExceededException("out of buffer space, cannot grow external buffer"); - while ( values.length > size-position ) + while ( values.length > size-position ) { size *= 2; + } byte[] newBuffer = new byte[size]; System.arraycopy(buffer, 0, newBuffer, 0, position); buffer = newBuffer; diff --git a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java index 2437f364bbb6..10a39694d9dc 100644 --- a/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java +++ b/javaunohelper/com/sun/star/lib/uno/helper/MultiTypeInterfaceContainer.java @@ -138,14 +138,16 @@ public class MultiTypeInterfaceContainer { it= map.values().iterator(); } - while (it.hasNext() ) + while (it.hasNext() ) { it.next().disposeAndClear(evt); + } } synchronized public void clear() { Iterator<InterfaceContainer> it= map.values().iterator(); - while (it.hasNext()) + while (it.hasNext()) { it.next().clear(); + } } } |