From fa22664be218c211c41342c6296616c316b2c3b1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 15 Oct 2014 16:25:10 +0200 Subject: java: always use braces for while loops Change-Id: Iff896b0cace8b8305528b3b0140004ea856169ce --- qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java | 4 ++-- qadevOOo/tests/java/ifc/style/_CharacterProperties.java | 3 ++- qadevOOo/tests/java/mod/_defreg/NestedRegistry.java | 3 ++- qadevOOo/tests/java/mod/_nestedreg/uno/NestedRegistry.java | 3 ++- qadevOOo/tests/java/mod/_simplereg/uno/SimpleRegistry.java | 3 ++- qadevOOo/tests/java/mod/_simreg/SimpleRegistry.java | 3 ++- 6 files changed, 12 insertions(+), 7 deletions(-) (limited to 'qadevOOo/tests/java') diff --git a/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java b/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java index 7fa5a7feccbd..87f7aee16cdc 100644 --- a/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java +++ b/qadevOOo/tests/java/ifc/sheet/_XArrayFormulaRange.java @@ -152,8 +152,8 @@ public class _XArrayFormulaRange extends MultiMethodTest { s1 = s1.trim() ; s2 = s2.trim() ; while (p1 < s1.length() && p2 < s2.length()) { - while (s1.charAt(p1) == ' ') p1 ++ ; - while (s2.charAt(p2) == ' ') p2 ++ ; + while (s1.charAt(p1) == ' ') { p1 ++; } + while (s2.charAt(p2) == ' ') { p2 ++; } if (s1.charAt(p1) != s2.charAt(p2)) return false ; p1 ++ ; p2 ++ ; diff --git a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java index 27270b74c631..6e968337a353 100644 --- a/qadevOOo/tests/java/ifc/style/_CharacterProperties.java +++ b/qadevOOo/tests/java/ifc/style/_CharacterProperties.java @@ -499,8 +499,9 @@ public class _CharacterProperties extends MultiPropertyTest { int count = members.size(); String[] res = new String[count]; int i=0; - while(oEnum.hasNext()) + while(oEnum.hasNext()) { res[i++] = oEnum.next(); + } return res; } diff --git a/qadevOOo/tests/java/mod/_defreg/NestedRegistry.java b/qadevOOo/tests/java/mod/_defreg/NestedRegistry.java index 2aa02482f779..a6cc37bdd93b 100644 --- a/qadevOOo/tests/java/mod/_defreg/NestedRegistry.java +++ b/qadevOOo/tests/java/mod/_defreg/NestedRegistry.java @@ -97,8 +97,9 @@ public class NestedRegistry extends TestCase { byte[] buf = new byte[1024] ; int bytesRead = 0 ; - while ((bytesRead = fIn.read(buf)) > 0) + while ((bytesRead = fIn.read(buf)) > 0) { fOut.write(buf, 0, bytesRead) ; + } fIn.close() ; fOut.close() ; diff --git a/qadevOOo/tests/java/mod/_nestedreg/uno/NestedRegistry.java b/qadevOOo/tests/java/mod/_nestedreg/uno/NestedRegistry.java index 10e72c09cc73..99caad5b8a52 100644 --- a/qadevOOo/tests/java/mod/_nestedreg/uno/NestedRegistry.java +++ b/qadevOOo/tests/java/mod/_nestedreg/uno/NestedRegistry.java @@ -94,8 +94,9 @@ public class NestedRegistry extends TestCase { byte[] buf = new byte[1024] ; int bytesRead = 0 ; - while ((bytesRead = fIn.read(buf)) > 0) + while ((bytesRead = fIn.read(buf)) > 0) { fOut.write(buf, 0, bytesRead) ; + } fIn.close() ; fOut.close() ; diff --git a/qadevOOo/tests/java/mod/_simplereg/uno/SimpleRegistry.java b/qadevOOo/tests/java/mod/_simplereg/uno/SimpleRegistry.java index 8fd5b48bda1c..4e6d8bbf27ae 100644 --- a/qadevOOo/tests/java/mod/_simplereg/uno/SimpleRegistry.java +++ b/qadevOOo/tests/java/mod/_simplereg/uno/SimpleRegistry.java @@ -76,8 +76,9 @@ public class SimpleRegistry extends TestCase { byte[] buf = new byte[1024] ; int bytesRead = 0 ; - while ((bytesRead = fIn.read(buf)) > 0) + while ((bytesRead = fIn.read(buf)) > 0) { fOut.write(buf, 0, bytesRead) ; + } fIn.close() ; fOut.close() ; diff --git a/qadevOOo/tests/java/mod/_simreg/SimpleRegistry.java b/qadevOOo/tests/java/mod/_simreg/SimpleRegistry.java index edafcccd5f9c..8f167de4fd3d 100644 --- a/qadevOOo/tests/java/mod/_simreg/SimpleRegistry.java +++ b/qadevOOo/tests/java/mod/_simreg/SimpleRegistry.java @@ -79,8 +79,9 @@ public class SimpleRegistry extends TestCase { byte[] buf = new byte[1024] ; int bytesRead = 0 ; - while ((bytesRead = fIn.read(buf)) > 0) + while ((bytesRead = fIn.read(buf)) > 0) { fOut.write(buf, 0, bytesRead) ; + } fIn.close() ; fOut.close() ; -- cgit