Uploaded image for project: 'BatchEE'
  1. BatchEE
  2. BATCHEE-48

ItemProcessListener.onProcessError() gets called with 'processedItem' instead of 'itemRead'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2-incubating
    • 0.2-incubating
    • None
    • None

    Description

      In case of an exception, ChunkStepController calls ItemProcessListener.onProcessError with 'processedItem'. But processedItem will be always 'null' unless the process method finishes without an exception.

      The specification states that 'the item about to be processed' should be passed:

      /**

      • The afterProcess method receives control after an item
      • processor processes an item. The method receives the item processed
      • and the result item as an input.
      • @param item specifies the item about to be processed.
      • @param ex specifies the exception thrown by the item processor.
      • @throws Exception
        */
        public void onProcessError(Object item, Exception ex) throws Exception;

      (Obviously the first part of the JavaDoc has been accidentally copied from the 'afterProcess' method.)

      Attachments

        Activity

          People

            romain.manni-bucau Romain Manni-Bucau
            a.gonzalez Alonso Gonzalez
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: