-
Bug
-
Resolution: Fixed
-
P3
-
11, 14
-
b07
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8245977 | 13.0.4 | Sergey Bylokhov | P3 | Resolved | Fixed | b03 |
JDK-8240249 | 11.0.8-oracle | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
JDK-8241205 | 11.0.8 | Sergey Bylokhov | P3 | Resolved | Fixed | b01 |
The LWWindowPeer.getOnscreenGraphics() is incorrectly null-check the surface data:
protected final Graphics getOnscreenGraphics(Color fg, Color bg, Font f) {
[1] if (getSurfaceData() == null) {
return null;
}
.....
if (f == null) {
f = DEFAULT_FONT;
}
[2] return new SunGraphics2D(getSurfaceData(), fg, bg, f);
}
If surfaceData became null after the check [1] but before [2] we wil get NPE.
protected final Graphics getOnscreenGraphics(Color fg, Color bg, Font f) {
[1] if (getSurfaceData() == null) {
return null;
}
.....
if (f == null) {
f = DEFAULT_FONT;
}
[2] return new SunGraphics2D(getSurfaceData(), fg, bg, f);
}
If surfaceData became null after the check [1] but before [2] we wil get NPE.
- backported by
-
JDK-8240249 NPE in LWWindowPeer.getOnscreenGraphics()
-
- Resolved
-
-
JDK-8241205 NPE in LWWindowPeer.getOnscreenGraphics()
-
- Resolved
-
-
JDK-8245977 NPE in LWWindowPeer.getOnscreenGraphics()
-
- Resolved
-
- links to