You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/12/18 13:06:22 UTC
[jira] Created: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
[classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
--------------------------------------------------------------------------------------------------------
Key: HARMONY-2770
URL: http://issues.apache.org/jira/browse/HARMONY-2770
Project: Harmony
Issue Type: Bug
Components: Classlib
Reporter: Denis Kishenko
According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
Harmony returns empty array while RI returns null.
It is compatibility issue.
import junit.framework.TestCase;
import javax.swing.tree.*;
public class test extends TestCase {
public void testcase1() {
DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
int [] a=t.getSelectionRows();
assertEquals(0, a.length);
}
}
Output on RI:
.E
Time: 0
There was 1 error:
1) testcase1(test)java.lang.NullPointerException
at test.testcase1(test.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
FAILURES!!!
Tests run: 1, Failures: 0, Errors: 1
OK (1 test)
Output on Harmony:
.
Time: 0.016
OK (1 test)
--
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-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462825 ]
Vasily Zakharov commented on HARMONY-2770:
------------------------------------------
I'll look into this issue.
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko updated HARMONY-2770:
-------------------------------------
Patch Info: [Patch Available]
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Attachments: Harmony-2770-Test.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Oliver Deakin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Deakin resolved HARMONY-2770.
------------------------------------
Resolution: Fixed
Thanks Vasily and Denis.
Patch applied at revision r495646. Please check that the patch was applied as expected.
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Oliver Deakin
> Attachments: Harmony-2770-Test.patch, Harmony-2770-Test.patch, Harmony-2770.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Assigned: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Oliver Deakin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Deakin reassigned HARMONY-2770:
--------------------------------------
Assignee: Oliver Deakin
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Oliver Deakin
> Attachments: Harmony-2770-Test.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464303 ]
Vasily Zakharov commented on HARMONY-2770:
------------------------------------------
Thanks Oliver, the patch is fine.
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Oliver Deakin
> Attachments: Harmony-2770-Test.patch, Harmony-2770-Test.patch, Harmony-2770.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462941 ]
Vasily Zakharov commented on HARMONY-2770:
------------------------------------------
Attached fix and test patches.
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-2770:
-------------------------------------
Attachment: Harmony-2770-Test.patch
Harmony-2770.patch
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Attachments: Harmony-2770-Test.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463959 ]
Vasily Zakharov commented on HARMONY-2770:
------------------------------------------
Sorry, Oliver, I missed those failures. There we more errors in the tests involved.
I've attached the updated patches.
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Oliver Deakin
> Attachments: Harmony-2770-Test.patch, Harmony-2770-Test.patch, Harmony-2770.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Oliver Deakin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463890 ]
Oliver Deakin commented on HARMONY-2770:
----------------------------------------
Applying Harmony-2770.patch causes 3 swing tests to fail in my workspace:
javax.swing.JTreeTest.testGetSetSelectionPath
javax.swing.JTreeTest.testGetSetSelectionRow
javax.swing.JTreeTest.testGetSetSelectionRows
They all fail with the following exception:
java.lang.NullPointerException at javax.swing.JTreeTest.testGetSetSelectionPath(JTreeTest.java:1963) at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) at javax.swing.BasicSwingTestCase.runBareSuper(BasicSwingTestCase.java:117) at javax.swing.BasicSwingTestCase.runBareImpl(BasicSwingTestCase.java:122) at javax.swing.BasicSwingTestCase$1.run(BasicSwingTestCase.java:136) at java.lang.Thread.run(Thread.java:872)
These tests passed before applying the patch.
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Oliver Deakin
> Attachments: Harmony-2770-Test.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Oliver Deakin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oliver Deakin closed HARMONY-2770.
----------------------------------
Verified by Vasily.
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Oliver Deakin
> Attachments: Harmony-2770-Test.patch, Harmony-2770-Test.patch, Harmony-2770.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2770) [classlib][swing]
DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI
returns null
Posted by "Vasily Zakharov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vasily Zakharov updated HARMONY-2770:
-------------------------------------
Attachment: Harmony-2770-Test.patch
Harmony-2770.patch
> [classlib][swing] DefaultTreeSelectionModel.getSelectionRows() returns empty array while RI returns null
> --------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-2770
> URL: https://issues.apache.org/jira/browse/HARMONY-2770
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Oliver Deakin
> Attachments: Harmony-2770-Test.patch, Harmony-2770-Test.patch, Harmony-2770.patch, Harmony-2770.patch
>
>
> According to the specification method returns "all of the currently selected rows. This will return null (or an empty array) if there are no selected TreePaths or a RowMapper has not been set".
> Harmony returns empty array while RI returns null.
> It is compatibility issue.
> import junit.framework.TestCase;
> import javax.swing.tree.*;
> public class test extends TestCase {
> public void testcase1() {
> DefaultTreeSelectionModel t=new DefaultTreeSelectionModel();
> int [] a=t.getSelectionRows();
> assertEquals(0, a.length);
> }
> }
> Output on RI:
> .E
> Time: 0
> There was 1 error:
> 1) testcase1(test)java.lang.NullPointerException
> at test.testcase1(test.java:9)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> OK (1 test)
> Output on Harmony:
> .
> Time: 0.016
> OK (1 test)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira