-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
beta
-
generic
-
generic
The java.awt.List class' method add(String item, int index) which states:
"Adds the specified item to the the scrolling list at the position
indicated by the index. The index is zero-based. If value of the
index is less than -1 then an ArrayIndexOutOfBoundsException is thrown.
If value of the index is greater than the number of items in the
list then the item is added to the end."
should be saying:
"Adds the specified item to the the scrolling list at the position
indicated by the index. The index is zero-based. If value of the
index is less than 0 or greater than the number of items in the
list then the item is added to the end."
Please notice that no exception is thrown by this method.
------------------------------------------------------------------------
The method makeVisible(int index) which states:
"Makes the item at the specified index visible."
should add the following line:
"ArrayIndexOutOfBoundsException is thrown if the index is less
than 0 or greater than the number of items in the list."
------------------------------------------------------------------------
A similar token also applies to the following methods:
replaceItem(String newValue, int index)
makeVisible(int index)
which also throws ArrayIndexOutOfBoundsException.
"Adds the specified item to the the scrolling list at the position
indicated by the index. The index is zero-based. If value of the
index is less than -1 then an ArrayIndexOutOfBoundsException is thrown.
If value of the index is greater than the number of items in the
list then the item is added to the end."
should be saying:
"Adds the specified item to the the scrolling list at the position
indicated by the index. The index is zero-based. If value of the
index is less than 0 or greater than the number of items in the
list then the item is added to the end."
Please notice that no exception is thrown by this method.
------------------------------------------------------------------------
The method makeVisible(int index) which states:
"Makes the item at the specified index visible."
should add the following line:
"ArrayIndexOutOfBoundsException is thrown if the index is less
than 0 or greater than the number of items in the list."
------------------------------------------------------------------------
A similar token also applies to the following methods:
replaceItem(String newValue, int index)
makeVisible(int index)
which also throws ArrayIndexOutOfBoundsException.