]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add private constructor for utility classes
authorPer-Åke Minborg <minborg@speedment.com>
Fri, 28 Oct 2016 05:28:51 +0000 (22:28 -0700)
committerVaadin Code Review <review@vaadin.com>
Wed, 2 Nov 2016 13:09:49 +0000 (13:09 +0000)
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7210

17 files changed:
server/src/main/java/com/vaadin/data/util/BeanUtil.java
server/src/main/java/com/vaadin/data/validator/BeanValidator.java
server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
server/src/main/java/com/vaadin/server/JsonCodec.java
server/src/main/java/com/vaadin/server/LegacyPaint.java
server/src/main/java/com/vaadin/server/ServletPortletHelper.java
server/src/main/java/com/vaadin/server/VaadinServiceClassLoaderUtil.java
server/src/main/java/com/vaadin/ui/declarative/Design.java
server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
server/src/main/java/com/vaadin/ui/themes/ValoTheme.java
server/src/main/java/com/vaadin/util/ConnectorHelper.java
server/src/main/java/com/vaadin/util/FileTypeResolver.java
server/src/main/java/com/vaadin/util/ReflectTools.java
server/src/main/java/com/vaadin/util/SerializerHelper.java
server/src/test/java/com/vaadin/tests/util/TestUtil.java
server/src/test/java/com/vaadin/ui/ComponentTest.java
server/src/test/java/com/vaadin/ui/RichTextAreaTest.java

index 763e6ec4b1a239f35b403bc6bd3abf00e7f0bc36..6faef0ff89c304a1539fdaa44f6f31677b53f5c7 100644 (file)
@@ -239,5 +239,8 @@ public final class BeanUtil implements Serializable {
                 return false;
             }
         }
+
+        private LazyValidationAvailability() {
+        }
     }
 }
index a3f9b86a6eaef1dcbd854b9a5c9e421637bffb02..2734658f8f5ff747384ad27cc348a4eef3592690 100644 (file)
@@ -189,5 +189,8 @@ public class BeanValidator implements Validator<Object> {
         private static ValidatorFactory getFactory() {
             return Validation.buildDefaultValidatorFactory();
         }
+
+        private LazyFactoryInitializer() {
+        }
     }
 }
index fa3b269fae39f4bbbe752c3251c5ff5b5e770751..54ab672589bf22cf374b96c8c273c057fd785bb4 100644 (file)
@@ -731,4 +731,7 @@ public class ComponentSizeValidator implements Serializable {
 
     }
 
+    private ComponentSizeValidator() {
+    }
+
 }
index adf3e029ee1d63b2ddd95af578c92db685d1fd88..588443d55bb3cf5b78fb50e1dcee7f4279a238f1 100644 (file)
@@ -993,4 +993,7 @@ public class JsonCodec implements Serializable {
         JSONSerializer serializer = customSerializers.get(value.getClass());
         return serializer.serialize(value, connectorTracker);
     }
+
+    private JsonCodec() {
+    }
 }
index 471570c1259e67d59fc7e23fd62fe4d298c03c44..0a65c932edfa6fb276cbd51f544c95d626606184 100644 (file)
@@ -69,4 +69,7 @@ public class LegacyPaint implements Serializable {
 
     }
 
+    private LegacyPaint() {
+    }
+
 }
index 1b9d87a455ef57534fd3f97601356085b98db888..5bd4c01427bc2b07646ea0e6c4a534b53098e147 100644 (file)
@@ -251,4 +251,7 @@ public class ServletPortletHelper implements Serializable {
 
         return Locale.getDefault();
     }
+
+    private ServletPortletHelper() {
+    }
 }
index 283b897087b044b158baf24ec5da322c7b9a4dd4..b2241f5ba5025085797d7e81a99ec9bcf27160a8 100644 (file)
@@ -54,4 +54,7 @@ class VaadinServiceClassLoaderUtil {
                 new VaadinServiceClassLoaderUtil.GetClassLoaderPrivilegedAction());
     }
 
+    private VaadinServiceClassLoaderUtil() {
+    }
+
 }
index 5298b0b1f9b09bcfbfa3cf4000bb530a60e0fd8f..8ac0ef41a8f8826bdd6efc4131c74a8b0ff80171 100644 (file)
@@ -773,4 +773,7 @@ public class Design implements Serializable {
         outputStream.write(doc.html().getBytes(UTF8));
     }
 
+    private Design() {
+    }
+
 }
index 2eea59a046b27f8903fd44ab668fa64200cb41fd..44248d095b587b63815f1bf432b35c9daeb0fb92 100644 (file)
@@ -508,4 +508,7 @@ public class DesignAttributeHandler implements Serializable {
         }
     }
 
+    private DesignAttributeHandler() {
+    }
+
 }
index df9621bf2772236b7f6009033453c2bf610e81b6..48fad1ce9547c083689a55a7e83fd01182a1bb28 100644 (file)
@@ -1072,4 +1072,7 @@ public class ValoTheme {
      * </pre>
      */
     public static final String MENU_APPEAR_ON_HOVER = "valo-menu-hover";
+
+    private ValoTheme() {
+    }
 }
index 5b5958175bba0df7b3ba9782111ad39f9bbc2436..46b4ba4bf13989e22f1041ae3c0269298f890467 100644 (file)
@@ -98,4 +98,7 @@ public class ConnectorHelper {
         }
     }
 
+    private ConnectorHelper() {
+    }
+
 }
index 305bc1c5d72700818a3f7ea6095cb6bb24445a33..da0d3df8534b57864631e4044cc94b6151369b1d 100644 (file)
@@ -392,4 +392,7 @@ public class FileTypeResolver implements Serializable {
     public static Map<String, Resource> getMIMETypeToIconMapping() {
         return Collections.unmodifiableMap(MIMEToIconMap);
     }
+
+    private FileTypeResolver() {
+    }
 }
index 1d37a4d1e148496decf0e813184d0405e5224a70..bd1035dac5596bbe69488794655a79111d5dc74e 100644 (file)
@@ -213,4 +213,7 @@ public class ReflectTools implements Serializable {
         }
         return type;
     }
+
+    private ReflectTools() {
+    }
 }
index 7ef09d9b43bb7fcd8571c75d342e59d5fe62974a..5b6b06c0c18807ef42a6c11d4901c85e8c4e9ab9 100644 (file)
@@ -154,4 +154,7 @@ public class SerializerHelper {
 
     }
 
+    private SerializerHelper() {
+    }
+
 }
index c4a185647b6f9c847805dd31e4756fe1694f44d3..eb5bd5e52554ccaf2b0a0337e241e61c425c1a43 100644 (file)
@@ -43,4 +43,7 @@ public class TestUtil {
                             + " has no match in the first iterable.");
         }
     }
+
+    private TestUtil() {
+    }
 }
index 09870b866ba8f847d16638f55f36abfb575454f5..c9ff9c7de4e6fab1ed228dc2030c7e69e1817229 100644 (file)
@@ -116,4 +116,7 @@ public class ComponentTest {
                 new HashSet<>(Arrays.asList(encodeState.keys())));
     }
 
+    private ComponentTest() {
+    }
+
 }
index 6a4fd3217309226fda038016860025ded6960052..a18105b5bb36906fbadcc4bef7c2565f401eda34 100644 (file)
@@ -22,8 +22,12 @@ import com.vaadin.server.ClientConnector;
 import com.vaadin.server.ServerRpcManager.RpcInvocationException;
 import com.vaadin.shared.ui.richtextarea.RichTextAreaServerRpc;
 import com.vaadin.tests.util.MockUI;
+import static com.vaadin.ui.ComponentTest.getRpcProxy;
+import static com.vaadin.ui.ComponentTest.isDirty;
+import static com.vaadin.ui.ComponentTest.syncToClient;
+import static com.vaadin.ui.ComponentTest.updateDiffState;
 
-public class RichTextAreaTest extends ComponentTest {
+public class RichTextAreaTest  {
 
     @Test
     public void initiallyEmpty() {