harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2406) [classlib][awt] j.a.e.KeyEvent.getKeyText(int) thows StringIndexOutOfBoundsException while RI doesn't
Date Mon, 15 Jan 2007 21:05:27 GMT

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

Mark Hindess commented on HARMONY-2406:
---------------------------------------

Yes.  You will find that line just after the comment "// Regression test for HARMONY-2406".


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

        

Mime
View raw message