-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
None
-
b07
-
generic
-
generic
Method getInstance(int) for java.awt.color.ICC_ColorSpace 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_ColorSpace;
public class Test1 {
public static void main(String[] args) {
try {
// test case ...
ICC_ColorSpace cs2 = (ICC_ColorSpace)ICC_ColorSpace.getInstance(-5);
boolean result = (cs2.isCS_sRGB());
System.out.println("res: " + result);
}
catch(IllegalArgumentException e1) {
System.out.println("result (iae) true");
}
}
}
###@###.### 2004-12-21 13:28:38 GMT
---------
import java.awt.color.ICC_ColorSpace;
public class Test1 {
public static void main(String[] args) {
try {
// test case ...
ICC_ColorSpace cs2 = (ICC_ColorSpace)ICC_ColorSpace.getInstance(-5);
boolean result = (cs2.isCS_sRGB());
System.out.println("res: " + result);
}
catch(IllegalArgumentException e1) {
System.out.println("result (iae) true");
}
}
}
###@###.### 2004-12-21 13:28:38 GMT
- csr for
-
JDK-8311995 ColorSpace.getInstance(int): IAE is not specified
-
- Closed
-