commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1632170 - in /commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils: ./ converters/ memoryleaktests/
Date Wed, 15 Oct 2014 20:13:27 GMT
Author: ggregory
Date: Wed Oct 15 20:13:26 2014
New Revision: 1632170

URL: http://svn.apache.org/r1632170
Log:
Convert control statement bodies to block.

Modified:
    commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BasicDynaBeanTestCase.java
    commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java
    commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropertyUtilsTestCase.java
    commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java
    commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/converters/ClassReloader.java
    commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java

Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BasicDynaBeanTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BasicDynaBeanTestCase.java?rev=1632170&r1=1632169&r2=1632170&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BasicDynaBeanTestCase.java
(original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BasicDynaBeanTestCase.java
Wed Oct 15 20:13:26 2014
@@ -290,15 +290,17 @@ public class BasicDynaBeanTestCase exten
         for (int i = 0; i < pd.length; i++) {
             String name = pd[i].getName();
             for (int j = 0; j < properties.length; j++) {
-                if (name.equals(properties[j]))
+                if (name.equals(properties[j])) {
                     count[j]++;
+                }
             }
         }
         for (int j = 0; j < properties.length; j++) {
-            if (count[j] < 0)
+            if (count[j] < 0) {
                 fail("Missing property " + properties[j]);
-            else if (count[j] > 1)
+            } else if (count[j] > 1) {
                 fail("Duplicate property " + properties[j]);
+            }
         }
 
     }

Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java?rev=1632170&r1=1632169&r2=1632170&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java
(original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/BeanUtilsTestCase.java
Wed Oct 15 20:13:26 2014
@@ -1650,10 +1650,18 @@ public class BeanUtilsTestCase extends T
         StringTokenizer tokenizer = new StringTokenizer(version,".");
         if (tokenizer.nextToken().equals("1")) {
             String minorVersion = tokenizer.nextToken();
-            if (minorVersion.equals("0")) return true;
-            if (minorVersion.equals("1")) return true;
-            if (minorVersion.equals("2")) return true;
-            if (minorVersion.equals("3")) return true;
+            if (minorVersion.equals("0")) {
+                return true;
+            }
+            if (minorVersion.equals("1")) {
+                return true;
+            }
+            if (minorVersion.equals("2")) {
+                return true;
+            }
+            if (minorVersion.equals("3")) {
+                return true;
+            }
         }
         return false;
     }

Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropertyUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropertyUtilsTestCase.java?rev=1632170&r1=1632169&r2=1632170&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropertyUtilsTestCase.java
(original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/PropertyUtilsTestCase.java
Wed Oct 15 20:13:26 2014
@@ -576,15 +576,17 @@ public class PropertyUtilsTestCase exten
         for (int i = 0; i < pd.length; i++) {
             String name = pd[i].getName();
             for (int j = 0; j < properties.length; j++) {
-                if (name.equals(properties[j]))
+                if (name.equals(properties[j])) {
                     count[j]++;
+                }
             }
         }
         for (int j = 0; j < properties.length; j++) {
-            if (count[j] < 0)
+            if (count[j] < 0) {
                 fail("Missing property " + properties[j]);
-            else if (count[j] > 1)
+            } else if (count[j] > 1) {
                 fail("Duplicate property " + properties[j]);
+            }
         }
 
     }
@@ -3993,12 +3995,15 @@ public class PropertyUtilsTestCase exten
         for (int i = 0; i < properties.length; i++) {
 
             // Identify the property descriptor for this property
-            if (properties[i].equals("intIndexed"))
+            if (properties[i].equals("intIndexed")) {
                 continue;
-            if (properties[i].equals("stringIndexed"))
+            }
+            if (properties[i].equals("stringIndexed")) {
                 continue;
-            if (properties[i].equals("writeOnlyProperty"))
+            }
+            if (properties[i].equals("writeOnlyProperty")) {
                 continue;
+            }
             int n = -1;
             for (int j = 0; j < pd.length; j++) {
                 if (properties[i].equals(pd[j].getName())) {
@@ -4048,16 +4053,22 @@ public class PropertyUtilsTestCase exten
         for (int i = 0; i < properties.length; i++) {
 
             // Identify the property descriptor for this property
-            if (properties[i].equals("intIndexed"))
+            if (properties[i].equals("intIndexed")) {
                 continue;
-            if (properties[i].equals("listIndexed"))
+            }
+            if (properties[i].equals("listIndexed")) {
                 continue;
+            }
             if (properties[i].equals("nested"))
+             {
                 continue; // This property is read only
-            if (properties[i].equals("readOnlyProperty"))
+            }
+            if (properties[i].equals("readOnlyProperty")) {
                 continue;
-            if (properties[i].equals("stringIndexed"))
+            }
+            if (properties[i].equals("stringIndexed")) {
                 continue;
+            }
             int n = -1;
             for (int j = 0; j < pd.length; j++) {
                 if (properties[i].equals(pd[j].getName())) {
@@ -4340,8 +4351,9 @@ public class PropertyUtilsTestCase exten
         java.util.Arrays.sort(mapKeys);
         StringBuilder buf = new StringBuilder();
         for(int i=0; i<mapKeys.length; ++i) {
-            if (i != 0)
+            if (i != 0) {
                 buf.append(", ");
+            }
             buf.append(mapKeys[i]);
         }
         return buf.toString();

Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java?rev=1632170&r1=1632169&r2=1632170&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java
(original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/TestBean.java
Wed Oct 15 20:13:26 2014
@@ -395,8 +395,9 @@ public class TestBean implements Seriali
     private TestBean nested = null;
 
     public TestBean getNested() {
-        if (nested == null)
+        if (nested == null) {
             nested = new TestBean();
+        }
         return (nested);
     }
 

Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/converters/ClassReloader.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/converters/ClassReloader.java?rev=1632170&r1=1632169&r2=1632170&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/converters/ClassReloader.java
(original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/converters/ClassReloader.java
Wed Oct 15 20:13:26 2014
@@ -68,8 +68,9 @@ public class ClassReloader extends Class
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         for(;;) {
             int bytesRead = classStream.read(buf);
-            if (bytesRead == -1)
+            if (bytesRead == -1) {
                 break;
+            }
             baos.write(buf, 0, bytesRead);
         }
         classStream.close();

Modified: commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java?rev=1632170&r1=1632169&r2=1632170&view=diff
==============================================================================
--- commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
(original)
+++ commons/proper/beanutils/trunk/src/test/java/org/apache/commons/beanutils/memoryleaktests/MemoryLeakTestCase.java
Wed Oct 15 20:13:26 2014
@@ -550,11 +550,21 @@ public class MemoryLeakTestCase extends 
         StringTokenizer tokenizer = new StringTokenizer(version,".");
         if (tokenizer.nextToken().equals("1")) {
             String minorVersion = tokenizer.nextToken();
-            if (minorVersion.equals("0")) return true;
-            if (minorVersion.equals("1")) return true;
-            if (minorVersion.equals("2")) return true;
-            if (minorVersion.equals("3")) return true;
-            if (minorVersion.equals("4")) return true;
+            if (minorVersion.equals("0")) {
+                return true;
+            }
+            if (minorVersion.equals("1")) {
+                return true;
+            }
+            if (minorVersion.equals("2")) {
+                return true;
+            }
+            if (minorVersion.equals("3")) {
+                return true;
+            }
+            if (minorVersion.equals("4")) {
+                return true;
+            }
         }
         return false;
     }



Mime
View raw message