-
Type:
CSR
-
Resolution: Unresolved
-
Priority:
P4
-
Component/s: client-libs
-
None
-
behavioral
-
minimal
-
-
Java API
-
SE
Summary
This CSR updates the behavior of the patch integrated under [JDK-8371308|https://bugs.openjdk.org/browse/JDK-8371308]. This change restores the original exception type thrown when the data argument is null from IllegalArgumentException back to NullPointerException.
Problem
The earlier patch modified the thrown exception for a null data argument from NullPointerException to IllegalArgumentException. This introduced an inconsistency with long-standing behavior, as well as with established practices in related code.
Solution
Revert the exception type for a null data parameter from IllegalArgumentException back to NullPointerException.
Specification
src/java.desktop/share/classes/java/awt/image/Kernel.java
@@ -59,7 +60,7 @@ public class Kernel implements Cloneable {
* @param width width of the kernel
* @param height height of the kernel
* @param data kernel data in row major order
- * @throws IllegalArgumentException if {@code data} is null
+ * @throws NullPointerException if {@code data} is null
* @throws IllegalArgumentException if {@code width} or {@code height}
* is not positive
* @throws IllegalArgumentException if product of {@code width} and
@@ -69,9 +70,7 @@ public class Kernel implements Cloneable {
* {@code height}
*/
public Kernel(int width, int height, float[] data) {
- csr of
-
JDK-8371501 Change IAE to NPE in java.awt.image.Kernel when data is null
-
- In Progress
-