Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-165

ItemReaders and ItemWriters are closed twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0.Beta1
    • 1.1.0.Final
    • jberet-core
    • None

      The two lines here: https://github.com/jberet/jsr352/blob/1.1.0.Final/jberet-core/src/main/java/org/jberet/runtime/runner/ChunkRunner.java#L196 close the ItemWriter and ItemReader after a chunk is processed.
      However, it is in a try-finally block, and in the finally block, they are closed again: https://github.com/jberet/jsr352/blob/1.1.0.Final/jberet-core/src/main/java/org/jberet/runtime/runner/ChunkRunner.java#L236

      In case the first attempt succeeded, the same writer and reader are closed twice.

              jmartisk@redhat.com Jan Martiska
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: