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

Skin implementations: must not violate contract of dispose

    Details

      Description

      From dispose doc:

      The methods getSkinnable() and getNode() should return null following a call to dispose. Calling dispose twice has no effect.

      The last sentence in particular implies that the calling code need not worry about duplicate calls (either by the caller itself or any other), that is the following test must pass:

          @Test
          public void testSkinDispose() {
              showControl();
              control.getSkin().dispose();
              control.getSkin().dispose();
          }
          
      It fails for some skins with an NPE, f.i. Tree/TableCell, Tree/TableView (there might be others, not yet tested). It's probably one of the reaons for JDK-8243940. Extracted this because the other issue might reveal additional quirks.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fastegal Jeanette Winzenburg
                Reporter:
                fastegal Jeanette Winzenburg
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: