PDA

View Full Version : [FIXED] [beta2] Field's reset() throws NullPointerException if originalValue is null



winnie
7 May 2008, 12:04 PM
The stack trace is below:

[ERROR] Uncaught exception escaped
java.lang.NullPointerException: null
at com.extjs.gxt.ui.client.widget.form.Field.fireChangeEvent(Field.java:484)
at com.extjs.gxt.ui.client.widget.form.Field.setValue(Field.java:424)
at com.extjs.gxt.ui.client.widget.form.Field.reset(Field.java:302)
at edu.caltech.ipac.firefly.gxt.InputFields.reset(InputFields.java:77)

Fields.java
483 protected void fireChangeEvent(Object oldValue, Object value) {
484 if (!value.equals(oldValue)) {
485 FieldEvent e = new FieldEvent(this);
486 e.oldValue = oldValue;
487 e.value = value;
488 fireEvent(Events.Change, e);
489 }
490 }

field.setValue(null) triggers NullPointerException in fireChangeEvent.

darrellmeyer
20 May 2008, 8:44 PM
fireChangeEvent handles nulls in beta 3.