harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Khaschansky (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2824) [classlib][swing] Compatibility: BasicFileChooserUI initializes actions on installUI, but RI does this during the construction of object.
Date Wed, 20 Dec 2006 17:34:21 GMT
[classlib][swing] Compatibility: BasicFileChooserUI initializes actions on installUI, but RI
does this during the construction of object.
-----------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2824
                 URL: http://issues.apache.org/jira/browse/HARMONY-2824
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Oleg Khaschansky


BasicFileChooserUI initializes actions on installUI, but RI does this during the construction
of object. The same could be applicable to other UI implementation classes in the swing package.
This is done by design in Harmony and it is a potential compatibility issue if someone will
try to retrieve an action before installUI method was called.

The same is applicable to the file view in BasicFileChooserUI (getFileView method returns
null on Harmony if called before installUI).

The following tescases demonstrate this:
------------------------------------------------------------------------------------------
import junit.framework.TestCase;

import javax.swing.plaf.basic.BasicFileChooserUI;
import javax.swing.*;

public class Test0 extends TestCase {
    BasicFileChooserUI b;

    protected void setUp() throws Exception {
        b = new BasicFileChooserUI(new JFileChooser(""));
    }

    public void testcase1() {
        assertNotNull(b.getApproveSelectionAction());
    }

    public void testcase2() {
        assertNotNull(b.getChangeToParentDirectoryAction());
    }

    public void testcase3() {
        assertNotNull(b.getGoHomeAction());
    }

    public void testcase4() {
        assertNotNull(b.getNewFolderAction());
    }

    public void testcase5() {
        assertNotNull(b.getUpdateAction());
    }

    public void testcase6() {
        assertNotNull(b.getFileView(new JFileChooser()));
    }
}


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