-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#12132 leads to NPEs #12207
Comments
There are different value change modes in TextField to overcome the possible issues regarding this. If you use eager mode, the input can become clunky, but you can use delayed mode instead and control it by parameters, so that TextField waits for next key press longer. |
With Vaadin 8.12.1, we get NPE Exceptions in code introduced in #12132.
As also pointed out in #12132 (comment).
Though it is rather unlikely that a
field_value == null
leads to amodel_value != null
, there might be cases this happens.We encountered null -> Optional.empty -> null, but chains like null -> default value -> null might also be possible.
This also questions the null check of
value
in lineframework/server/src/main/java/com/vaadin/data/Binder.java
Line 1287 in 949434a
Maybe the solution is:
The code leads to "immediate" normalization of values in the gui by running the conversion back and forth and makes it more difficult to allow users to enter values that have multiple representations e.g. enter decimal values too slow with StringToDoubleConverter and default TextFields is quite challenging when typing slowly. 😉
The text was updated successfully, but these errors were encountered: