-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
More properly document existing behavior.
-
Java API
-
SE
Summary
Add @throws IllegalArgumentException to the specification of java.awt.color.ICC_Profile.getInstance(byte[])
Problem
The javadoc for this method already states "Throws an {@code IllegalArgumentException} if the data does not correspond to a valid ICC Profile." But properly this should be specified with an @throws clause
Solution
Update the specification as above.
Specification
src/java.desktop/share/classes/java/awt/color/ICC_Profile.java
/**
* Constructs an {@code ICC_Profile} object corresponding to the data in a
- * byte array. Throws an {@code IllegalArgumentException} if the data does
- * not correspond to a valid ICC Profile.
+ * byte array.
*
* @param data the specified ICC Profile data
* @return an {@code ICC_Profile} object corresponding to the data in the
* specified {@code data} array
+ * @throws IllegalArgumentException If the byte array does not contain valid
+ * ICC Profile data
*/
public static ICC_Profile getInstance(byte[\] data) {
link for convenience https://github.com/openjdk/jdk/pull/2328/files
- csr of
-
JDK-6211198 ICC_Profile.getInstance(byte[]): IAE is not specified
-
- Resolved
-