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

ValidationMessagesImpl's getters return empty array instead of null

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Normal Normal
    • 8.5.1
    • 8.5.0
    • None
    • Security Level: Jimmy

      Steps to Reproduce

      check the source code

      Current Result

      most getters like getMessages, getKeyMessages return null when no message exists.
      Callers have to check null case, if it returns an empty array, callers can just iterate the return object without checking null

      Expected Result

      return an empty array

      Reason from Effective Java

            rudyhuang rudyhuang
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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