Pārlūkot izejas kodu

Remove unnecessary null-check at ValueContext constructors (#11915)

tags/8.11.0.alpha1
Konstantin Kuzmin pirms 4 gadiem
vecāks
revīzija
7b06320711
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam

+ 0
- 5
server/src/main/java/com/vaadin/data/ValueContext.java Parādīt failu

@@ -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();

Notiek ielāde…
Atcelt
Saglabāt