ItEr38S05ValidacionEProbasFuncionaisItEr37S06: [Bug #41] Fixed. Calling trim and checking that input is not empty.
This commit is contained in:
parent
5626be0b16
commit
0e68da790b
1 changed files with 4 additions and 1 deletions
|
|
@ -242,7 +242,10 @@ public class Util {
|
|||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
InputEvent newInput = (InputEvent) event;
|
||||
String value = newInput.getValue();
|
||||
String value = newInput.getValue().trim();
|
||||
if (value.isEmpty()) {
|
||||
value = "0";
|
||||
}
|
||||
setter.set(Integer.valueOf(value));
|
||||
intBox.setValue(getter.get());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue