Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-4067

IOException when processed empty file with FileSplitter and FileMarkers

    XMLWordPrintable

Details

    Description

      I work with spring-integration FileSplitter and use FileMarker-s, but for empty files i get IOException. Without FileMarker-s all works fine

      stacktrace:

      Caused by: java.io.IOException: Stream closed
      at java.io.BufferedReader.ensureOpen(BufferedReader.java:122)
      at java.io.BufferedReader.readLine(BufferedReader.java:317)
      at java.io.BufferedReader.readLine(BufferedReader.java:389)
      at org.springframework.integration.file.splitter.FileSplitter$1.hasNext(FileSplitter.java:183)
      ... 50 more
      

      xml-config:

      <int:chain input-channel="channel.read.file" output-channel="channel.process.input">
          <int-file:splitter markers="true"/>
          <int:filter expression="!(payload instanceof T(org.springframework.integration.file.splitter.FileSplitter.FileMarker))"
                  discard-channel="channel.process.file.marker"/>
      </int:chain>
      

      Attachments

        Activity

          People

            abilan Artem Bilan
            Semernitskaya Semernitskaya Olga
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: