imageio-ext
  1. imageio-ext
  2. IMAGEIO_EXT-7

FileImageInputStreamExtImpl constructor throws wrong exception

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: 1.1.0
    • Component/s: customstreams
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      7

      Description

      There is a little bug in the constructors of
      stream.input.FileImageInputStreamExtImpl (File f, int bufferSize). The issue is
      that it should throw IOException or FileNotFoundException should there be a
      problem with the input file, but it is throwing IllegalArgumentException instead.
      In GeoTools, this ends up having consequences in the GeoTiffFormat.accepts()
      method, which expects only IOException's. Thus, if you attempt to check if the
      GeoTiffFormat can accept an invalid (e.g., non-existing) file, it blows up
      instead of returning false.

        Activity

        Hide
        mjonathan added a comment -

        Created an attachment (id=1)
        Patch for the bug, includes test case

        Show
        mjonathan added a comment - Created an attachment (id=1) Patch for the bug, includes test case
        Hide
        dany111 added a comment -

        -

        Show
        dany111 added a comment - -
        Hide
        dany111 added a comment -

        Bug fixed as revision 651.

        Show
        dany111 added a comment - Bug fixed as revision 651.

          People

          • Assignee:
            dany111
            Reporter:
            mjonathan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: