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

javax.swing.plaf.metal.MetalComboBoxUI.getBaseline(JComponent, int, int) doesn't throwIAE

XMLWordPrintable

        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);

              alexp Alexander Potochkin (Inactive)
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: