Commons DbUtils
  1. Commons DbUtils
  2. DBUTILS-110

ArrayHandler should return an empty array when handle has no rows

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 1.6
    • Labels:
      None

      Description

      ArrayHandler#handle returns null if there are no rows.

      However ArrayListHandler#handle returns an empty list, as do all the other implementations that return a collection.

      It would be more consistent if ArrayHandler#handle returned an empty array.

      Note: for implementations of ResultSetHandler that return a single object, rather than an array or collection, returning null does make sense.

        Activity

        Sebb created issue -
        Benedikt Ritter made changes -
        Field Original Value New Value
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Benedikt Ritter made changes -
        Fix Version/s 1.6 [ 12322483 ]
        Benedikt Ritter made changes -
        Assignee Benedikt Ritter [ britter ]
        Benedikt Ritter made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Benedikt Ritter made changes -
        Summary Inconsistent behaviour when handle has no rows ArrayHandler should return an empty array when handle has no rows
        Hide
        Benedikt Ritter added a comment -

        Fixed in r1611104

        Show
        Benedikt Ritter added a comment - Fixed in r1611104
        Benedikt Ritter made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Benedikt Ritter made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        428d 1h 31m 1 Benedikt Ritter 16/Jul/14 18:32
        In Progress In Progress Resolved Resolved
        3m 48s 1 Benedikt Ritter 16/Jul/14 18:36
        Resolved Resolved Closed Closed
        3d 15h 11m 1 Benedikt Ritter 20/Jul/14 09:48

          People

          • Assignee:
            Benedikt Ritter
            Reporter:
            Sebb
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development