ValidationMessagesImpl's getters return empty array instead of null

XMLWordPrintable

    • Type: New Feature
    • Resolution: Done
    • Priority: Normal
    • 8.5.1
    • Affects Version/s: 8.5.0
    • Component/s: None
    • Security Level: Jimmy
    • None

      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

            Assignee:
            rudyhuang
            Reporter:
            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