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

[jira] Commented: (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:comment-tabpanel#action_12464938 ] 

Andrey Pavlenko commented on HARMONY-2406:
------------------------------------------

Mark, is the patch for the test applied? I can't find KeyEvent.getKeyText(4); string in the test.

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