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

javax.swing.border.TitledBorder.getBaseline() doesn't throw IAE when width is < 0

XMLWordPrintable

    • b27
    • generic
    • generic
    • Not verified

        The spec ( http://java.sun.com/javase/6/docs/api/javax/swing/border/TitledBorder.html#getBaseline(java.awt.Component,%20int,%20int) ) says:

        Throws:
            IllegalArgumentException - if width or height is < 0

        For example, the following lines of code will throw nothing:

            new TitledBorder("123").getBaseline( new Button(), -1, 0 );
            new TitledBorder("123").getBaseline( new Component() {}, Integer.MIN_VALUE, 0 );

              malenkov Sergey Malenkov (Inactive)
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: