You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2007/01/12 21:31:27 UTC

[jira] Resolved: (HARMONY-2406) [classlib][awt] j.a.e.KeyEvent.getKeyText(int) thows StringIndexOutOfBoundsException while RI doesn't

     [ https://issues.apache.org/jira/browse/HARMONY-2406?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Hindess resolved HARMONY-2406.
-----------------------------------

    Resolution: Fixed
      Assignee: Mark Hindess

Applied patches in r495724.  I modified the test to follow the project conventions for exception handling - that is, letting junit handle them.

Please confirm that the patches have been applied as expected.


> [classlib][awt] j.a.e.KeyEvent.getKeyText(int) thows StringIndexOutOfBoundsException while RI doesn't
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2406
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2406
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Denis Kishenko
>         Assigned To: Mark Hindess
>         Attachments: KeyEvent.patch, KeyEventTest.patch
>
>
> For java.awt.event.KeyEvent.getKeyText(int keyCode) method - Harmony throws java.lang.StringIndexOutOfBoundsException if keyCode does not equal a key constant for a physical key on the keyboard while RI does not. There is no mention about this situation in java spec
> ============ Test ==============
> import java.awt.event.KeyEvent;
> import java.awt.event.KeyEvent;
> public class Test {
>    public static void main(String[] argv) {
>            KeyEvent.getKeyText(4); 
>    }
> }
> ========= RI ========
> noting
> ======== Harmony =====
> java.lang.StringIndexOutOfBoundsException
>     at java.lang.String.charAt(String.java:585)
>     at java.awt.event.KeyEvent.getDefaultName(KeyEvent.java:486)
>     at java.awt.event.KeyEvent.getKeyText(KeyEvent.java:474)
>     at Test.main(Test.java:11)

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