Spring Batch
  1. Spring Batch
  2. BATCH-1618

MultiResourceItemWriter creates an empty file if the number of item to write is a multiple of itemCountLimitPerResource

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.3
    • Component/s: Infrastructure
    • Labels:
      None
    • Environment:
      Windows XP SP3

      Description

      MultiResourceItemWriter creates files on the filesystem when setting the resource to the delegate. If the number of items to write is a multiple of itemCountLimitPerResource, the last file will be created, but nothing will be written into it.

      The attached patch defers the file creation in the write method.

        Activity

        Hide
        Dave Syer added a comment -

        Patch applied, thanks.

        Show
        Dave Syer added a comment - Patch applied, thanks.

          People

          • Assignee:
            Dave Syer
            Reporter:
            Christian Gossart
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified