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/12/20 18:34:21 UTC

[jira] Created: (HARMONY-2824) [classlib][swing] Compatibility: BasicFileChooserUI initializes actions on installUI, but RI does this during the construction of object.

[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

        

[jira] Updated: (HARMONY-2824) [classlib][swing] Compatibility: BasicFileChooserUI initializes actions on installUI, but RI does this during the construction of object.

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov updated HARMONY-2824:
-------------------------------------

    Priority: Minor  (was: Major)

> [classlib][swing] Compatibility: BasicFileChooserUI initializes actions on installUI, but RI does this during the construction of object.
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2824
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2824
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Oleg Khaschansky
>            Priority: Minor
>
> 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.
-
You can reply to this email to add a comment to the issue online.