-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
No behavior change - specification only so minimal risk
-
Java API
-
SE
Summary
Specify that java.awt.image.AreaAveragingScaleFilter(int, int) will throw IllegalArgumentException when passed 0 for width or height parameter.
Problem
Constructor AreaAveragingScaleFilter(int, int) of the java.awt.image.AreaAveragingScaleFilter class throws IllegalArgumentException when 0 is passed as value to width or height parameterbut it is not specified in the specification.
Solution
Update the specification to document that IllegalArgumentException will be thrown for 0 value passed to AreaAveragingScaleFilter(int width, int height).
Specification
src/java.desktop/share/classes/java/awt/image/AreaAveragingScaleFilter.java
/**
* Constructs an AreaAveragingScaleFilter that scales the pixels from
* its source Image as specified by the width and height parameters.
* @param width the target width to scale the image
* @param height the target height to scale the image
+ * @throws IllegalArgumentException if {@code width} equals
+ * zero or {@code height} equals zero
*/
public AreaAveragingScaleFilter(int width, int height) {
super(width, height);
}
- csr of
-
JDK-6211242 AreaAveragingScaleFilter(int, int): IAE is not specified
-
- Resolved
-