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] Created: (HARMONY-2566) [classlib][swing] j.s.text.GapContent.getChars throws NPE rather than BadLocationException
Date Mon, 11 Dec 2006 07:54:21 GMT
[classlib][swing] j.s.text.GapContent.getChars throws NPE rather than BadLocationException

                 Key: HARMONY-2566
                 URL: http://issues.apache.org/jira/browse/HARMONY-2566
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Alexey A. Ivanov

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) {
------------ end of code ------------

Running this application on Harmony produces the output:

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


View raw message