harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Okomin (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2788) [classlib][swing] Compatibility: javax.swing.tree.VariableHeightLayoutCache.isExpanded() throws NPE on RI while it doesn't on Harmony
Date Tue, 19 Dec 2006 10:35:21 GMT
[classlib][swing] Compatibility: javax.swing.tree.VariableHeightLayoutCache.isExpanded() throws
NPE on RI while it doesn't on Harmony
-------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2788
                 URL: http://issues.apache.org/jira/browse/HARMONY-2788
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ilya Okomin
            Priority: Minor


On RI VariableHeightLayoutCache.isExpanded(TreePath) throws NPE if TreePath argument is constructed
from an array of null values.
Next test case passes on RI while it fails on Harmony:
----------- test.java ------------
import javax.swing.tree.TreePath;
import javax.swing.tree.VariableHeightLayoutCache;

import junit.framework.TestCase;
import junit.textui.TestRunner;

public class test extends TestCase {

    public static void main(String args[]) {
        TestRunner.run(test.class);
    }

    public void testRun() {
        Object[] array = new Object[2]; // array of null values 
        TreePath tp = new TreePath(array);
        VariableHeightLayoutCache vhlc = new VariableHeightLayoutCache();
        boolean result = false;
        System.out.println("TreePath argument = " + tp);
        try{
            result = vhlc.isExpanded(tp);
            System.out.println("vhlc.isExpanded(tp) = " + result);
            fail("NPE Expected");
        } catch (NullPointerException e) {
            e.printStackTrace();
        }
    }
}
------------------------------------
IMO it is a non-bug difference. Harmony returns false on VariableHeightLayoutCache.isExpanded(tp)
if tp has onle null values that is doesn't contradict with the spec.

-- 
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

        

Mime
View raw message