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

ValidationMessagesImpl's getters return empty array instead of null

    XMLWordPrintable

    Details

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

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

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