Fix CS warnings in sal-clustering-commons and enable enforcement
[controller.git] / opendaylight / md-sal / sal-clustering-commons / src / test / java / org / opendaylight / controller / cluster / datastore / node / utils / stream / ValueTypesTest.java
index ff1ddad7056d18b713f350a2a45d9c06caea95f3..34b542105738617db80c412ee5a1ff57e5da0461 100644 (file)
@@ -9,25 +9,25 @@
 package org.opendaylight.controller.cluster.datastore.node.utils.stream;
 
 import static org.junit.Assert.assertEquals;
+
 import org.junit.Test;
 
 public class ValueTypesTest {
     @Test
-    public void testStringType(){
+    public void testStringType() {
         assertEquals(ValueTypes.STRING_TYPE, ValueTypes.getSerializableType("foobar"));
         final String largeString = largeString(ValueTypes.STRING_BYTES_LENGTH_THRESHOLD);
         assertEquals(ValueTypes.STRING_BYTES_TYPE, ValueTypes.getSerializableType(largeString));
     }
 
-    private static String largeString(int minSize){
+    private static String largeString(int minSize) {
         final int pow = (int) (Math.log(minSize * 2) / Math.log(2));
-        String s = "X";
-        for(int i=0;i<pow;i++){
-            StringBuilder b = new StringBuilder();
-            b.append(s).append(s);
-            s = b.toString();
+        String str = "X";
+        for (int i = 0; i < pow; i++) {
+            StringBuilder buf = new StringBuilder();
+            buf.append(str).append(str);
+            str = buf.toString();
         }
-        return s;
+        return str;
     }
-
-}
\ No newline at end of file
+}