Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6875153

JLayer.isOptimizedDrawingEnabled() throws NPE for null glass pane set

    Details

    • Subcomponent:
    • Resolved In Build:
      b72
    • CPU:
      generic
    • OS:
      generic

      Description

      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]

        Attachments

          Activity

            People

            • Assignee:
              alexp Alexander Potochkin (Inactive)
              Reporter:
              dbessono Dmitry Bessonov
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: