You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Oleg Khaschansky (JIRA)" <ji...@apache.org> on 2006/10/25 16:35:16 UTC
[jira] Created: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
[classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
----------------------------------------------------------------------------------------------------------------------------
Key: HARMONY-1965
URL: http://issues.apache.org/jira/browse/HARMONY-1965
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Oleg Khaschansky
javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
IndexOutOfBoundsException - if either anchor or lead are less than -1
The same is applicable to removeSelectionInterval and setSelectionInterval methods.
Code for reproducing:
import javax.swing.*;
public class Test{
public static void main(String[] args) {
Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
"Color"};
JList toRet = new JList(data);
toRet.addSelectionInterval(1, -2);
System.out.println("PASSED");
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Oleg Khaschansky updated HARMONY-1965:
--------------------------------------
Attachment: harmony-1965.patch
patch
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Attachments: harmony-1965.patch, harmony-1965test.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=comments#action_12445178 ]
Oleg Khaschansky commented on HARMONY-1965:
-------------------------------------------
Yes, sorry, I missed this. It seems like add/set/remove methods do nothing (on RI) if the model is empty. I'll look further into this.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Stepan Mishura reassigned HARMONY-1965:
---------------------------------------
Assignee: Stepan Mishura
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965test.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Stepan Mishura closed HARMONY-1965.
-----------------------------------
Verified by Oleg.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=comments#action_12448121 ]
Oleg Khaschansky commented on HARMONY-1965:
-------------------------------------------
Thanks Stepan. Verified.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Oleg Khaschansky updated HARMONY-1965:
--------------------------------------
Attachment: harmony-1965test1.patch
New testcase.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Stepan Mishura resolved HARMONY-1965.
-------------------------------------
Resolution: Fixed
Thanks Oleg - patches were applied to SWING module at r472046.
Please check that the patch was applied as you expected.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=comments#action_12445081 ]
Stepan Mishura commented on HARMONY-1965:
-----------------------------------------
Oleg, actually the fix is for DefaultListSelectionModel so it would be nice to have regression tests for all DefaultListSelectionModel class methods affected by the fix.
Thanks,
Stepan.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965test.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Oleg Khaschansky updated HARMONY-1965:
--------------------------------------
Attachment: harmony-1965test.patch
Patch for the unit test
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Attachments: harmony-1965.patch, harmony-1965test.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Stepan Mishura (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=comments#action_12445156 ]
Stepan Mishura commented on HARMONY-1965:
-----------------------------------------
But the new test case for DefaultListSelectionModel class fails on RI. Could you comment/verify this?
Thanks,
Stepan.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Oleg Khaschansky updated HARMONY-1965:
--------------------------------------
Attachment: harmony-1965.patch
RI checks for -1 before doing anything, so these methods return before failing if -1 is passed. I updated a patch to match this behavior. Also I'll attach an updated testcase.
There's another problem with insertIndexInterval behavior.
The following sequence will throw IAE on RI:
DefaultListSelectionModel model = new DefaultListSelectionModel();
model.addSelectionInterval(0, 3);
model.insertIndexInterval(0, -2, true);
But the following will pass silently:
DefaultListSelectionModel model = new DefaultListSelectionModel();
model.insertIndexInterval(0, -2, true);
The behavior of insertIndexInterval on RI differs from other methods and seems to be inconsistent. I suggest not to copy this behavior and throw IAE in both cases.
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-1965) [classlib][swing]
javax.swing.JList.addSelectionInterval(int, int) doesn't throw
IndexOutOfBoundsException if parameter < -1
Posted by "Oleg Khaschansky (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-1965?page=all ]
Oleg Khaschansky updated HARMONY-1965:
--------------------------------------
Attachment: harmony-1965test1.patch
Patch for the DefaultListSelectionModelTest
> [classlib][swing] javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1965
> URL: http://issues.apache.org/jira/browse/HARMONY-1965
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Oleg Khaschansky
> Assigned To: Stepan Mishura
> Attachments: harmony-1965.patch, harmony-1965test.patch, harmony-1965test1.patch
>
>
> javax.swing.JList.addSelectionInterval(int, int) doesn't throw IndexOutOfBoundsException if parameter < -1
> javax.swing.JList.addSelectionInterval(int anchor,int lead)specification reads:
> IndexOutOfBoundsException - if either anchor or lead are less than -1
> The same is applicable to removeSelectionInterval and setSelectionInterval methods.
> Code for reproducing:
> import javax.swing.*;
> public class Test{
> public static void main(String[] args) {
> Object[] data = {"Icon", "Int", "trueitem3", "charsetitem4",
> "Color"};
> JList toRet = new JList(data);
> toRet.addSelectionInterval(1, -2);
> System.out.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira