harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2745) [classlib][swing] j.s.text.Utilities.getPosition{Above, Below} throw NPE
Date Wed, 07 Feb 2007 08:50:05 GMT

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

Alexey A. Ivanov commented on HARMONY-2745:
-------------------------------------------

These tests still fail for me:

testGetPositionAbove
java.lang.NullPointerException
	at org.apache.harmony.awt.text.TextUtils.getPositionAbove(TextUtils.java:382)
	at javax.swing.text.Utilities.getPositionAbove(Utilities.java:69)
	at javax.swing.text.UtilitiesTest.testGetPositionAbove(UtilitiesTest.java:637)
	<SNIP>

testGetPositionBelow
java.lang.NullPointerException
	at org.apache.harmony.awt.text.TextUtils.getPositionBelow(TextUtils.java:416)
	at javax.swing.text.Utilities.getPositionBelow(Utilities.java:79)
	at javax.swing.text.UtilitiesTest.testGetPositionBelow(UtilitiesTest.java:643)
	<SNIP>


The UtilitiesTest is now in the exclude list --- this seem to be the reason all AWT and Swing
tests passed for you without the fix.

> [classlib][swing] j.s.text.Utilities.getPosition{Above, Below} throw NPE
> ------------------------------------------------------------------------
>
>                 Key: HARMONY-2745
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2745
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>         Assigned To: Alexey Petrenko
>         Attachments: H2745-j.s.text.UtilitiesTest.patch, H2745-o.a.h.awt.text.TextUtils.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.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message