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

java.awt.image.SampleModel.setDataElements() does't throw ArrayIndexOutOfBoundsEx for Integer.MAX_VA

XMLWordPrintable

    • 2d
    • b138
    • generic
    • generic
    • Verified

      The spec for java.awt.image.SampleModel.setDataElements() says:

      "@throws ArrayIndexOutOfBoundsException if the coordinates are not in bounds, or if obj is too small to hold the output."

      However, this exception is not thrown if x or y coordinate is set to Integer.MAX_VALUE.

      This problems leads to failing JCK test:

      api/java_awt/Image/SampleModel/index.html#GetsetDataElements2[getsetDataElements20004]

            bae Andrew Brygin
            bae Andrew Brygin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: