You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey A. Ivanov (JIRA)" <ji...@apache.org> on 2006/12/15 13:50:22 UTC

[jira] Updated: (HARMONY-2745) [classlib][swing] j.s.text.Utilities.getPosition{Above, Below} throw NPE

     [ http://issues.apache.org/jira/browse/HARMONY-2745?page=all ]

Alexey A. Ivanov updated HARMONY-2745:
--------------------------------------

    Attachment: H2745-j.s.text.UtilitiesTest.patch

Regression tests.

> [classlib][swing] j.s.text.Utilities.getPosition{Above, Below} throw NPE
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-2745
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2745
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>         Attachments: H2745-j.s.text.UtilitiesTest.patch
>
>
> javax.swing.text.Utilities.getPositionAbove and .getPositionBelow throw NullPointerException whereas RI works silently.
> To reproduce, use the following code:
> JTextComponent tc = new JEditorPane("text/plain", "");
> System.out.println(Utilities.getPositionAbove(tc, 1, 0));
> System.out.println(Utilities.getPositionBelow(tc, 1, 0));
> ------- Harmony -------
> java.lang.NullPointerException
> 	at org.apache.harmony.awt.text.TextUtils.getPositionAbove(TextUtils.java:383)
> 	at javax.swing.text.Utilities.getPositionAbove(Utilities.java:69)
> java.lang.NullPointerException
> 	at org.apache.harmony.awt.text.TextUtils.getPositionBelow(TextUtils.java:417)
> 	at javax.swing.text.Utilities.getPositionBelow(Utilities.java:79)
> ------- end of H -------
> ------- RI -------
> -1
> -1
> ------- end of RI -------

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