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

GIF WriteParam should throw IllegalStateException when compression mode is set to MODE_DISABLED

XMLWordPrintable

    • b56
    • generic
    • generic
    • Verified

      I am getting the DefaultWriteParam from GIF Writer and calling param.setCompressionMode(MODE_DISABLED). I expect GIF Writer to throw an IllegalStateException as mentioned in the API spec since GIF does not offer uncompressed output. 'LZW' is the default, mandatory compression mode. But GIF Writer allows this and does not throw any exception. Internally, it continues to use the default compression mode.

      This is reproducible since Mustang-b39 on all platforms. This is reproducible for JPEG writer also (this writer also should not allow the user to disable compression) but a separate bug has been filed against the JPEG writer (4972154).

      I have attached a sample test which reproduces this bug.
      ###@###.### 2005-07-07 14:07:53 GMT

            bae Andrew Brygin
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: