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 2007/02/13 09:23:06 UTC

[jira] Closed: (HARMONY-2566) [classlib][swing] j.s.text.GapContent.getChars throws NPE rather than BadLocationException

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

Alexey A. Ivanov closed HARMONY-2566.
-------------------------------------


Verified.
Thank you, Mark.

> [classlib][swing] j.s.text.GapContent.getChars throws NPE rather than BadLocationException
> ------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2566
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2566
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>         Assigned To: Mark Hindess
>         Attachments: H2566-GapContent.patch, H2566-GapContentTest.patch
>
>
> Consider the following code:
> import javax.swing.text.GapContent;
> public class Test {
>     public static void main(String[] args) {
>         GapContent content = new GapContent();
>         try {
>             content.getChars(1, Integer.MAX_VALUE, null);
>         } catch (Exception e) {
>             e.printStackTrace();
>         } 
>     }
> }
> ------------ end of code ------------
> Running this application on Harmony produces the output:
> java.lang.NullPointerException
> 	at javax.swing.text.GapContent.getChars(GapContent.java:152)
> 	at Test.main(Test.java:7)
> ------------ end of Harmony output ------------
> Whereas RI throws BadLocationException:
> javax.swing.text.BadLocationException: Invalid location
> 	at javax.swing.text.GapContent.getChars(GapContent.java:169)
> 	at Test.main(Test.java:7)
> ------------ end of RI output ------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.