Details
-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
None
-
b10
-
generic
-
generic
Description
Method getInstance(byte[]) for java.awt.color.ICC_Profile class throws IllegalArgumentException when passed a negative value for a input parameter. Such behavior is not specified either in the member spec or in the package/class description.
---------
import java.awt.color.ICC_Profile;
public class Test1 {
public static void main(String[] args) {
String apiTested = "ICC_Profile.getInstance(byte[]): ";
String msg = apiTested;
try {
// test case ...
byte x[] = {
-21, -22, -23
};
ICC_Profile profile = ICC_Profile.getInstance(x);
boolean result = true;
msg = apiTested;
System.out.println("res: " + result);
}
catch(IllegalArgumentException e1) {
System.out.println("result (iae): true");
}
}
}
###@###.### 2004-12-21 13:18:54 GMT
---------
import java.awt.color.ICC_Profile;
public class Test1 {
public static void main(String[] args) {
String apiTested = "ICC_Profile.getInstance(byte[]): ";
String msg = apiTested;
try {
// test case ...
byte x[] = {
-21, -22, -23
};
ICC_Profile profile = ICC_Profile.getInstance(x);
boolean result = true;
msg = apiTested;
System.out.println("res: " + result);
}
catch(IllegalArgumentException e1) {
System.out.println("result (iae): true");
}
}
}
###@###.### 2004-12-21 13:18:54 GMT
Attachments
Issue Links
- csr for
-
JDK-8260689 ICC_Profile.getInstance(byte[]): IAE is not specified
- Closed