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

spec for java.awt.List.List() is wrong

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.0
    • 1.2.0
    • docs
    • 1.2fcs
    • sparc
    • solaris_2.5
    • Verified



      Name: dsC58869 Date: 05/26/98



      The JLS for java.awt.List.List() constructor is wrong.
      It says there are no visible lines in the list :
          /**
           * Creates a new scrolling list. Initially there are no visible
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           * lines, and only one item can be selected from the list.
             ^^^^^
           */
          public List()
       
      But List(0, false) called by List() sets number of visible lines
      to DEFAULT_VISIBLE_ROWS (package private constant):
      " * @(#)List.java 1.54 98/04/11"

           public List(int rows, boolean multipleMode) {
      this.rows = (rows != 0) ? rows : DEFAULT_VISIBLE_ROWS;
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      this.multipleMode = multipleMode;
          }

      ======================================================================
       Justification:
      Wrong specification, should be fixed for JCK testing.

      ======================================================================

            dgreensunw Dale Green (Inactive)
            dsilaev Dmitri Silaev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: