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

TextFieldXXCell: NPE on calling startEdit

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 9
    • jfx18
    • javafx

    Description

      happens if XX is null - as there is no pre-condition for calling the method, it must accept the state (the base implementations do, but not the TextField variants, didn't test any of the others like combo, picker ..)

      failing test for ListCell, for comparison the passing base:

          /**
           * NPE on all TextFieldXXCell (not with base XXCell!)
           */
          @Test
          public void testTextFieldCellNullControlOnStartEditStandalone() {
              ListCell cell = TextFieldListCell.forListView().call(null);
              cell.startEdit();
          }

          /**
           * NPE on all TextFieldXXCell (not with base XXCell!)
           */
          @Test
          public void testBaseNullControlOnStartEditStandalone() {
              ListCell cell = new ListCell();
              cell.startEdit();
          }
          
       

      Attachments

        Issue Links

          Activity

            People

              mhanl Marius Hanl
              fastegal Jeanette Winzenburg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: