* @return the Integer value or null if {@link NumberFormatException} occurs.
*/
public Integer getInteger() {
- String text = super.getText().trim();
- try {
- return text.equals("") ? 0 : new Integer(text);
- } catch (NumberFormatException e) {
- exception = e;
- }
+ if(super.getText()!=null){
+ String text = super.getText().trim();
+ try {
+ return text.equals("") ? 0 : new Integer(text);
+ } catch (NumberFormatException e) {
+ exception = e;
+ }
+ }
return null;
}