-
Bug
-
Resolution: Fixed
-
P4
-
6u3, 7
-
b118
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2185283 | 6-pool | Unassigned | P5 | Closed | Won't Fix |
The specification inherited from ComponentUI.getBaseline(JComponent, int, int) says:
* @throws NullPointerException if <code>c</code> is <code>null</code>
* @throws IllegalArgumentException if width or height is < 0
But the following code will throw nothing:
BasicScrollPaneUI ui = new BasicScrollPaneUI();
ui.installUI(new JScrollPane());
// no NPE
ui.getBaseline((JComponent)null, 1, 1);
// no IAE
ui.getBaseline(new JScrollPane(), -1, 1);
ui.getBaseline(new JScrollPane(), 1, -1);
ui.getBaseline(new JScrollPane(), -1, -1);
* @throws NullPointerException if <code>c</code> is <code>null</code>
* @throws IllegalArgumentException if width or height is < 0
But the following code will throw nothing:
BasicScrollPaneUI ui = new BasicScrollPaneUI();
ui.installUI(new JScrollPane());
// no NPE
ui.getBaseline((JComponent)null, 1, 1);
// no IAE
ui.getBaseline(new JScrollPane(), -1, 1);
ui.getBaseline(new JScrollPane(), 1, -1);
ui.getBaseline(new JScrollPane(), -1, -1);
- backported by
-
JDK-2185283 javax.swing.plaf.basic.BasicScrollPaneUI.getBaseline(JComponent, int, int) doesn't throw NPE and IAE
-
- Closed
-
- relates to
-
JDK-6633517 javax.swing.plaf.metal.MetalComboBoxUI.getBaseline(JComponent, int, int) doesn't throwIAE
-
- Closed
-