]> source.dussan.org Git - vaadin-framework.git/commitdiff
Remove unnecessary null-check at ValueContext constructors (#11915)
authorKonstantin Kuzmin <kocc95@mail.ru>
Tue, 7 Apr 2020 10:19:02 +0000 (12:19 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Apr 2020 10:19:02 +0000 (13:19 +0300)
server/src/main/java/com/vaadin/data/ValueContext.java

index b4a5012179fefd6749747a5f204f42e9a4fa4b1d..b332960a1f8c933ffffd0e9d58d89080e6785743 100644 (file)
@@ -17,7 +17,6 @@ package com.vaadin.data;
 
 import java.io.Serializable;
 import java.util.Locale;
-import java.util.Objects;
 import java.util.Optional;
 
 import com.vaadin.ui.Component;
@@ -67,8 +66,6 @@ public class ValueContext implements Serializable {
      */
     @SuppressWarnings("unchecked")
     public ValueContext(Component component) {
-        Objects.requireNonNull(component,
-                "Component can't be null in ValueContext construction");
         this.component = component;
         if (component instanceof HasValue) {
             hasValue = (HasValue<?>) component;
@@ -88,8 +85,6 @@ public class ValueContext implements Serializable {
      * @since 8.1
      */
     public ValueContext(Component component, HasValue<?> hasValue) {
-        Objects.requireNonNull(component,
-                "Component can't be null in ValueContext construction");
         this.component = component;
         this.hasValue = hasValue;
         locale = findLocale();