ArrayIndexOutOfBoundsException Not Documented for SinglePixelPackedSampleModel.getSampleSize(int)

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • 27
    • Affects Version/s: 17, 21, 25, 26, 27
    • Component/s: client-libs
    • 2d

      The method does not specify what should happen when out-of-bounds values are passed to the getSampleSize(int) method. Normally, an ArrayIndexOutOfBoundsException should be specified in the method contract. This should be added to the specification for all versions of the method across the different classes.

      For example:

      int x = new SinglePixelPackedSampleModel(
              DataBuffer.TYPE_INT,
              30, 20,
              new int[]{0x00, 0xFF, 0xFFFF, 0xFFFFFFFF}
      ).getSampleSize(20);

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

              Created:
              Updated: