-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
1.4.0
-
None
-
Fix Understood
-
sparc
-
solaris_7
Name: atR10191 Date: 12/25/2001
constructor public BufferedImage(int width, int height, int imageType)
throws unexpected IllegalArgumentException when width and height are 0
which shows the example below
============ Test55.java ==============================================
import java.awt.image.BufferedImage;
public class Test55 {
public static void main(String argv[]) {
try {
new BufferedImage(0, 0, BufferedImage.TYPE_INT_ARGB);
} catch (Exception e) {
e.printStackTrace();
System.out.println("failed");
System.exit(1);
}
System.out.println("OKAY");
System.exit(0);
}
}
======== end of Test55.java ==========================================
======== output of Test55 ==========================================
java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Direct
ColorModel.java:999)
at java.awt.image.BufferedImage.<init>(BufferedImage.java:259)
at Test55.main(Test55.java:6)
failed
======== end of output of Test55 ==========================================
======================================================================
- csr for
-
JDK-8369155 constructor of BufferedImage throws unexpected IllegalArgumentException
-
- Draft
-
- links to
-
Review(master) openjdk/jdk/27640