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

TextFieldXXCell: NPE on calling startEdit

XMLWordPrintable

      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();
          }
          
       

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

              Created:
              Updated:
              Resolved: