-
Type:
CSR
-
Resolution: Approved
-
Priority:
P4
-
Component/s: client-libs
-
None
-
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>
- csr of
-
JDK-6453640 BandedSampleModel.createCompatibleSampleModel() API docs are wrong
-
- Resolved
-
- relates to
-
JDK-8370470 The exception handling for the BandedSampleModel constructor is different
-
- Closed
-