-
Bug
-
Resolution: Duplicate
-
P4
-
6u3, 7
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2185281 | 6-pool | Alexander Potochkin | P4 | Closed | Duplicate |
The specification inherited from ComponentUI.getBaseline(JComponent, int, int) says:
* @throws IllegalArgumentException if width or height is < 0
The following code throws nothing:
MetalComboBoxUI ui = new MetalComboBoxUI();
ui.installUI(new JComboBox());
// IAE is not thrown from any of the following lines
ui.getBaseline(new JComboBox(), 0, Integer.MIN_VALUE);
ui.getBaseline(new JComboBox(), 1, Integer.MIN_VALUE);
ui.getBaseline(new JComboBox(), 10000, Integer.MIN_VALUE);
ui.getBaseline(new JComboBox(), Integer.MAX_VALUE, Integer.MIN_VALUE);
* @throws IllegalArgumentException if width or height is < 0
The following code throws nothing:
MetalComboBoxUI ui = new MetalComboBoxUI();
ui.installUI(new JComboBox());
// IAE is not thrown from any of the following lines
ui.getBaseline(new JComboBox(), 0, Integer.MIN_VALUE);
ui.getBaseline(new JComboBox(), 1, Integer.MIN_VALUE);
ui.getBaseline(new JComboBox(), 10000, Integer.MIN_VALUE);
ui.getBaseline(new JComboBox(), Integer.MAX_VALUE, Integer.MIN_VALUE);
- backported by
-
JDK-2185281 javax.swing.plaf.metal.MetalComboBoxUI.getBaseline(JComponent, int, int) doesn't throwIAE
- Closed
- duplicates
-
JDK-6632953 MetalComboBoxUI.getBaseline(JComponent, int, int) throws IAE for valid width/height
- Closed
- relates to
-
JDK-6632810 javax.swing.plaf.basic.BasicScrollPaneUI.getBaseline(JComponent, int, int) doesn't throw NPE and IAE
- Closed