You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Roman S. Bushmanov (JIRA)" <ji...@apache.org> on 2007/06/25 10:07:26 UTC

[jira] Created: (HARMONY-4276) [classlib][awt] Unimplemented functionality in java.awt.im.InputContext

[classlib][awt] Unimplemented functionality in java.awt.im.InputContext
-----------------------------------------------------------------------

                 Key: HARMONY-4276
                 URL: https://issues.apache.org/jira/browse/HARMONY-4276
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Roman S. Bushmanov


I've looked into the sources of InputContext and found out that it doesnt have sensible implementation. All its functions have do nothing. 
There are probably some other unimplemented awt classes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4276) [classlib][awt] Unimplemented functionality in java.awt.im.InputContext

Posted by "Roman S. Bushmanov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510729 ] 

Roman S. Bushmanov commented on HARMONY-4276:
---------------------------------------------

Andrey, you are right, if the instance of Input context is obtained through getInstance() method, everything is ok. But what if someone extends this class and obtains its instance through the protected constructor?

> [classlib][awt] Unimplemented functionality in java.awt.im.InputContext
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4276
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4276
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Roman S. Bushmanov
>
> I've looked into the sources of InputContext and found out that it doesnt have sensible implementation. All its functions have do nothing. 
> There are probably some other unimplemented awt classes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4276) [classlib][awt] Unimplemented functionality in java.awt.im.InputContext

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511133 ] 

Andrey Pavlenko commented on HARMONY-4276:
------------------------------------------

Roman, in this case all required methods should be reimplemented. Also, according to the spec - "This method is protected so clients cannot instantiate InputContext directly. Input contexts are obtained by calling getInstance()." Moreover, I believe that RI also has empty implementation of InputContext, the following test demonstrates it:

    public void test() {
        final InputContext c1 = InputContext.getInstance();
        final InputContext c2 = new InputContext() {};

        System.out.println("c1.getClass(): " + c1.getClass());

        System.out.println("c1.getLocale(): " + c1.getLocale());
        System.out.println("c2.getLocale(): " + c2.getLocale());

        try {
            c1.reconvert();
        } catch (UnsupportedOperationException ex) {
            System.out.println("c1.reconvert(): " + ex);
        }

        c2.reconvert();
        System.out.println("c2.reconvert(): silent");
    }

Output:
c1.getClass(): class sun.awt.im.InputMethodContext
c1.getLocale(): en_US
c2.getLocale(): null
c1.reconvert(): java.lang.UnsupportedOperationException
c2.reconvert(): silent

> [classlib][awt] Unimplemented functionality in java.awt.im.InputContext
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4276
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4276
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Roman S. Bushmanov
>
> I've looked into the sources of InputContext and found out that it doesnt have sensible implementation. All its functions have do nothing. 
> There are probably some other unimplemented awt classes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-4276) [classlib][awt] Unimplemented functionality in java.awt.im.InputContext

Posted by "Andrey Pavlenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-4276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510154 ] 

Andrey Pavlenko commented on HARMONY-4276:
------------------------------------------

Roman, the input methods are implemented in the org.apache.harmony.awt.im.InputMethodContext class. The class java.awt.im.InputContext has only one implemented method - getInstance(). This method returns the implementation of InputContext - org.apache.harmony.awt.im.InputMethodContext.
I think this issue should be closed as invalid.

> [classlib][awt] Unimplemented functionality in java.awt.im.InputContext
> -----------------------------------------------------------------------
>
>                 Key: HARMONY-4276
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4276
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Roman S. Bushmanov
>
> I've looked into the sources of InputContext and found out that it doesnt have sensible implementation. All its functions have do nothing. 
> There are probably some other unimplemented awt classes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.