-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P2
-
Affects Version/s: 6
-
Component/s: client-libs
-
b94
-
generic
-
generic
Updated specification for javax.swing.JList method "addSelectionInterval(int index0, int index1)" contains two assertions:
"This method does nothing if either index is -1."
and
"If either index is less than -1, an IndexOutOfBoundsException is thrown."
The second sentence must mention that it's true only if another index != -1, i.e. this two sentences must be tightly linked together or combined into one.
Currently
new JList().addSelectionInterval(-3, -1);
would not throw exception and this behavior looks very confusing.
"This method does nothing if either index is -1."
and
"If either index is less than -1, an IndexOutOfBoundsException is thrown."
The second sentence must mention that it's true only if another index != -1, i.e. this two sentences must be tightly linked together or combined into one.
Currently
new JList().addSelectionInterval(-3, -1);
would not throw exception and this behavior looks very confusing.
- relates to
-
JDK-6444133 Specification for JList should be updated
-
- Resolved
-