-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
tiger
-
generic, x86
-
generic, windows_2000, windows_xp
Calling BufferedImage.flush() before that image is ever rendered to or copied
from will cause a NullPointerException to be thrown. The following testcase
reproduces the problem easily on the latest 2D nightly builds:
import java.awt.image.BufferedImage;
public class FlushTest {
public static void main(String[] args) {
try {
BufferedImage bi = new BufferedImage(10, 10,
BufferedImage.TYPE_INT_RGB);
bi.flush();
} catch (NullPointerException npe) {
throw new RuntimeException("Test failed: NPE thrown in " +
"BufferedImage.flush()");
}
}
}
from will cause a NullPointerException to be thrown. The following testcase
reproduces the problem easily on the latest 2D nightly builds:
import java.awt.image.BufferedImage;
public class FlushTest {
public static void main(String[] args) {
try {
BufferedImage bi = new BufferedImage(10, 10,
BufferedImage.TYPE_INT_RGB);
bi.flush();
} catch (NullPointerException npe) {
throw new RuntimeException("Test failed: NPE thrown in " +
"BufferedImage.flush()");
}
}
}
- duplicates
-
JDK-4906526 java.lang.NullPointerException thrown when loading applets
- Closed
-
JDK-4910175 REGRESSION: JCK1.5 api/java_awt/Image/BufferedImage/index.html#FlushTesttestCase
- Closed
-
JDK-4910203 REGRESSIION: JCK1.5-runtime api/java_awt/Component/descriptions.html#createImage
- Closed
-
JDK-4907225 java.lang.nullpointerexception thrown in java console loading any applet
- Closed