Commons DbUtils
  1. Commons DbUtils
  2. DBUTILS-60

Enhance message in QueryRunner#rethrow for Batch

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2, Nightly Builds
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      If an error is thrown when executing a Batch (via the QueryRunner#batch method), the rethrow method incorrectly transform the batch parameters in to a String:
      instead of

      msg.append(Arrays.asList(params));

      the following should be used:

      msg.append(Arrays.deepToString(params));

      This would allow the batch parameters to be correctly displayed, instead of having [java.lang.Object[]@8954, java.lang.Object[]@78946]

        Activity

        Hide
        Dan Fabulich added a comment -

        Fixed in revision 832548.

        Show
        Dan Fabulich added a comment - Fixed in revision 832548.
        Hide
        Julien Aymé added a comment -

        This method should also use a StringBuilder instead of a StringBuffer.

        Show
        Julien Aymé added a comment - This method should also use a StringBuilder instead of a StringBuffer.

          People

          • Assignee:
            Unassigned
            Reporter:
            Julien Aymé
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 10m
              10m
              Remaining:
              Remaining Estimate - 10m
              10m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development