Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8366

Close used iterator if RuntimeException is thrown at next()/hasNext() in Splitter

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.14.1
    • 2.14.2, 2.15.0
    • camel-core
    • None
    • Unknown

    Description

      There're some spots using user provided iterator but don't close them if RuntimeException is thrown during iteration even if it's Closeable . It would be convenient if it is closed in finally block.

      I immediately found 2, guessing there're some more else:
      https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/Splitter.java#L232-L234
      https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java#L267-L347

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            igarashitm Tomohisa Igarashi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: