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

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

    Details

    • Subcomponent:
    • Resolved In Build:
      b27
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Backports

        Description

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

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: