Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8287102

ImageReaderSpi.canDecodeInput() for standard plugins should return false if a stream is too short

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 8, 11, 17, 19
    • client-libs
    • None

      Currently most of the built-in standard javax.imageio plugins throw an IOException from
      ImageReaderSpi.canDecodeInput(Object) if it is an ImageInputStream and the available bytes
      are fewer than the plugin needs to identify the image type.

      It has been proposed that in this case they should return false instead as a matter of
      quality of implementation.

      See discussion thread here : https://mail.openjdk.java.net/pipermail/client-libs-dev/2022-May/004428.html

            prr Philip Race
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: