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

1.5.0 Regression: NPE when switching from Metal L&F with JComboBox

    XMLWordPrintable

Details

    • beta
    • x86
    • windows_nt

    Backports

      Description

        Bug 4864304 made various performance enhancements to Swing. One of the things it did was to allow null for the horizontal scroll bar of a JScrollPane. It then changed BasicComboPopup to set the horizontal scrollbar of the scrollpane to null.

        After this fix, when using a JComboBox to switch the look and feel from Metal, a NullPointerException is thrown from MetalScrollPaneUI.uninstallUI (which doesn't check for null). A test case is attached (JSliderTest.java). Run it, and switch to another L&F.

        Note: I have another test case which does something similar (ListTest.java), but it isn't affected. I don't know why - could this be timing related?

        Attachments

          Issue Links

            Activity

              People

                svioletsunw Scott Violet (Inactive)
                shickeysunw Shannon Hickey (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: