Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.5
    • Component/s: Misc Component
    • Labels:
      None

      Description

      more specifically, ui.getBaseline throws NPE:

          @Test
          public void testBaselineNPE() {
              JXList list = new JXList();
              list.getUI().getBaseline(list, 1, 1);
          }
      
      

      reason is that the method calls super.getBaseline(...) which assumes that that its list field is assigned (which it isn't because the type hierarchy is a hack). Fix is to simply not call super.

      Note to myself: check if there are other such super calls ...

        Activity

        Hide
        kleopatra added a comment -
        • fixed by not calling super
        • added pre-condition check
        • updated api doc to include the change
        • added tests

        checked for other super calls (none, except getBaselineResizeBehaviour which doesn't access the list)

        committed as of #4233

        Show
        kleopatra added a comment - fixed by not calling super added pre-condition check updated api doc to include the change added tests checked for other super calls (none, except getBaselineResizeBehaviour which doesn't access the list) committed as of #4233

          People

          • Assignee:
            kleopatra
            Reporter:
            kleopatra
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: