ItEr38S05ValidacionEProbasFuncionaisItEr37S06: [Bug #41] Fixed. Calling trim and checking that input is not empty.

This commit is contained in:
Manuel Rego Casasnovas 2009-12-08 09:57:56 +01:00 committed by Javier Moran Rua
parent 5626be0b16
commit 0e68da790b

View file

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