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

NPE in Decimalbox.setValue(String)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.0
    • Fix Version/s: 8.5.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S1

      Description

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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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