BandedSampleModel.createCompatibleSampleModel() API docs are wrong

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P4
    • 26
    • Component/s: client-libs
    • None
    • 2d
    • minimal
    • Doc change, no implementation.
    • Java API
    • SE

      Summary

      Update the specification of BandedSampleModel to correctly document exceptions.

      Problem

      The java doc for java.awt.image.BandedSampleModel mistates some error conditions.

      Solution

      Correct the documentation. No change to the implementation.

      Specification

      <pre> public class java.awt.image.BandedSampleModel - * @throws IllegalArgumentException if {@code w} or - * {@code h} equals either - * {@code Integer.MAX_VALUE} or - * {@code Integer.MIN_VALUE} - * @throws IllegalArgumentException if {@code dataType} is not - * one of the supported data types + * @throws IllegalArgumentException if the product of {@code w} + * and {@code h} is greater than {@code Integer.MAX_VALUE} + * or {@code w} or {@code h} is not greater than 0. */ public SampleModel createCompatibleSampleModel(int w, int h); - * @throws IllegalArgumentException if {@code dataType} is not - * one of the supported data types + * @throws IllegalArgumentException if the number of bands is not greater than 0 + * @throws ArrayIndexOutOfBoundsException if any of the bank indices is out of bounds */ public SampleModel createSubsetSampleModel(int[] bands) </pre>

            Assignee:
            Philip Race
            Reporter:
            Igor Nekrestyanov (Inactive)
            Alexander Zvegintsev, Sergey Bylokhov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: