-
Bug
-
Resolution: Fixed
-
P2
-
7
-
b72
-
generic
-
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]