-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
This is minimal to none since the code would already throw this, but did not document it.
-
Java API
-
SE
Summary
Some methods in the java.awt.color.ICC_ProfileRGB class throw unspecified exceptions.
Problem
The methods ICC_ProfileRGB.getGamma(int) and ICC_ProfileRGB.getTRC(int) throw IllegalArgumentException for invalid parameters.
Solution
Update the specification.
Specification
java/awt/color/ICC_ProfileRGB.java
@@ -179,37 +169,18 @@
* </pre>
*
* @param component the {@code ICC_ProfileRGB} constant that represents the
* component whose TRC you want to retrieve
* @return the gamma value as a float
+ * @throws IllegalArgumentException if the component is not
+ * {@code REDCOMPONENT}, {@code GREENCOMPONENT}, or
+ * {@code BLUECOMPONENT}
* @throws ProfileDataException if the profile does not specify the
* corresponding TRC as a single gamma value
*/
public float getGamma(int component) {
@@ -230,35 +201,34 @@
*
* @param component the {@code ICC_ProfileRGB} constant that represents the
* component whose TRC you want to retrieve: {@code REDCOMPONENT},
* {@code GREENCOMPONENT}, or {@code BLUECOMPONENT}
* @return a short array representing the TRC
+ * @throws IllegalArgumentException if the component is not
+ * {@code REDCOMPONENT}, {@code GREENCOMPONENT}, or
+ * {@code BLUECOMPONENT}
* @throws ProfileDataException if the profile does not specify the
* corresponding TRC as a table
*/
public short[] getTRC(int component) {
- csr of
-
JDK-8254370 Update the classes in the java.awt.color package
-
- Resolved
-