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

Null Pointer when navigating in colorpicker

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8u20
    • 8u20
    • javafx

      run helloColorPicker, press space, press down key, get null Pointer.

      --- a/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPale
      tte.java
      +++ b/modules/controls/src/main/java/com/sun/javafx/scene/control/skin/ColorPale
      tte.java
      @@ -365,7 +365,7 @@
               }
               if (index == len) {
                   ColorSquare cs = colorPickerGrid.getSquares().get(0);
      - focusedSquare.requestFocus();
      + if (focusedSquare != null ) focusedSquare.requestFocus();
                   focusedSquare = cs;
               }
           }

      prevents the exception, BUT ignores the first down key press.
      Most likely need to set an initial index after the space.

            jgiles Jonathan Giles
            jandrese Joe Andresen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: