-
Type:
Bug
-
Status: Resolved
-
Priority:
P2
-
Resolution: Fixed
-
Affects Version/s: 7
-
Fix Version/s: 7
-
Component/s: client-libs
-
Labels:
-
Subcomponent:
-
Resolved In Build:b72
-
CPU:generic
-
OS:generic
Method javax.swingJLayer.isOptimizedDrawingEnabled() throws NPE if glass pane is set to null.
Please see the following code sample:
public class NPE {
public static void main(String[] args) {
javax.swing.JLayer layer = new javax.swing.JLayer();
layer.setGlassPane(null);
layer.isOptimizedDrawingEnabled();
}
}
Exception in thread "main" java.lang.NullPointerException
at javax.swing.JLayer.isOptimizedDrawingEnabled(JLayer.java:322)
...
The following JCK test fails due to this problem
api/javax_swing/JLayer/index.html#General[isOptimizedDrawingEnabled_nullGlassPane]
Please see the following code sample:
public class NPE {
public static void main(String[] args) {
javax.swing.JLayer layer = new javax.swing.JLayer();
layer.setGlassPane(null);
layer.isOptimizedDrawingEnabled();
}
}
Exception in thread "main" java.lang.NullPointerException
at javax.swing.JLayer.isOptimizedDrawingEnabled(JLayer.java:322)
...
The following JCK test fails due to this problem
api/javax_swing/JLayer/index.html#General[isOptimizedDrawingEnabled_nullGlassPane]