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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: 8, 11, 17, 19
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: