]> source.dussan.org Git - vaadin-framework.git/commitdiff
Correctly check if validators are present (#11450)
authorArtur Signell <artur@vaadin.com>
Wed, 25 May 2016 20:08:50 +0000 (23:08 +0300)
committerVaadin Code Review <review@vaadin.com>
Fri, 27 May 2016 07:41:26 +0000 (07:41 +0000)
Change-Id: Ibc0173f96a1000e709bd7ee90cccd500fad1a223

server/src/main/java/com/vaadin/ui/AbstractField.java

index e69322b1cc62fd64abda6a188cf6c88a83633bf8..49eb5b050f870296debf09b612aa6368cfa70301 100644 (file)
@@ -507,7 +507,7 @@ public abstract class AbstractField<T> extends AbstractComponent implements
             // Repaint is needed even when the client thinks that it knows the
             // new state if validity of the component may change
             if (repaintIsNotNeeded
-                    && (isRequired() || getValidators() != null || getConverter() != null)) {
+                    && (isRequired() || hasValidators() || getConverter() != null)) {
                 repaintIsNotNeeded = false;
             }
 
@@ -885,6 +885,10 @@ public abstract class AbstractField<T> extends AbstractComponent implements
         }
     }
 
+    private boolean hasValidators() {
+        return validators != null && !validators.isEmpty();
+    }
+
     /**
      * Removes the validator from the field.
      *