Kafka
  1. Kafka
  2. KAFKA-407

Uncaught InputStream.close() exception in CompressionUtils.compress()

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.7.1
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None

      Description

      In CompressionUtils.compress(), in this try/catch block:

      ==========
      try

      { cf.write(messageByteBuffer.array) }

      catch

      { case e: IOException => error("Error while writing to the GZIP output stream", e) cf.close() throw e }

      finally

      { cf.close() }

      ==========

      cf.close() might throw an IOException, which is not handled.

        Activity

        Hide
        Jun Rao added a comment -

        In this case, we probably just want to throw the exception to the caller.

        Show
        Jun Rao added a comment - In this case, we probably just want to throw the exception to the caller.

          People

          • Assignee:
            Unassigned
            Reporter:
            Lorenzo Alberton
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development