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] Closed: (HARMONY-2566) [classlib][swing] j.s.text.GapContent.getChars throws NPE rather than BadLocationException
Date Tue, 13 Feb 2007 08:23:06 GMT

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


Mime
View raw message