[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cp-patches] FYI: MetalComboBoxUI fixlet
From: |
David Gilbert |
Subject: |
[cp-patches] FYI: MetalComboBoxUI fixlet |
Date: |
Tue, 18 Oct 2005 15:13:23 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.6 (X11/20050728) |
This patch fixes a NullPointerException that shows up in our Mauve tests:
2005-10-18 David Gilbert <address@hidden>
* javax/swing/plaf/metal/MetalComboBoxUI.java
(editablePropertyChanged): handle null selected item.
Regards,
Dave
Index: javax/swing/plaf/metal/MetalComboBoxUI.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalComboBoxUI.java,v
retrieving revision 1.4
diff -u -r1.4 MetalComboBoxUI.java
--- javax/swing/plaf/metal/MetalComboBoxUI.java 19 Sep 2005 08:51:37 -0000
1.4
+++ javax/swing/plaf/metal/MetalComboBoxUI.java 18 Oct 2005 14:04:53 -0000
@@ -251,7 +251,11 @@
}
else
{
- arrowButton.setText(comboBox.getSelectedItem().toString());
+ String text = "";
+ Object selected = comboBox.getSelectedItem();
+ if (selected != null)
+ text = selected.toString();
+ arrowButton.setText(text);
if (editor != null)
editor.setVisible(true);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [cp-patches] FYI: MetalComboBoxUI fixlet,
David Gilbert <=