Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3698

NPE in Decimalbox.setValue(String)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.5.0
    • None
    • Security Level: Jimmy
    • ZK 8.5.2 S1

      I've managed to pass a null String to org.zkoss.lang.reflect.Fields.set() which causes this.setValue(new BigDecimal(str)); in Decimalbox.setValue(String) to throw an NPE.

      I think the correct code is:

      	public void setValue(String str){
      		this.setValue(str == null ? ((BigDecimal)null) : new BigDecimal(str));
      	}
      

            rudyhuang rudyhuang
            digulla digulla
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h