]> source.dussan.org Git - vaadin-framework.git/commitdiff
Prevent NPE in comparison (#12218) (#12230) 8.12 8.12.4
authorAnna Koskinen <Ansku@users.noreply.github.com>
Fri, 5 Mar 2021 12:17:20 +0000 (14:17 +0200)
committerGitHub <noreply@github.com>
Fri, 5 Mar 2021 12:17:20 +0000 (14:17 +0200)
* Prevent NPE in comparison (#12218)

Fixes: https://github.com/vaadin/framework/issues/12207
server/src/main/java/com/vaadin/data/Binder.java

index c41461f7292441ec76f2301c9ddc547ef6464751..8a11cc36ee81941ef89a3013c1c21ea1f5e9c487 100644 (file)
@@ -1286,7 +1286,7 @@ public class Binder<BEAN> implements Serializable {
                     setter.accept(bean, value);
                     if (value != null) {
                         FIELDVALUE converted = convertToFieldType(value);
-                        if (!field.getValue().equals(converted)) {
+                        if (!Objects.equals(field.getValue(), converted)) {
                             getField().setValue(converted);
                         }
                     }