harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Okomin (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2554) [classlib][swing]javax.swing.text.GapContent.getString() throws different exceptions on Harmony and RI
Date Fri, 08 Dec 2006 15:12:24 GMT
[classlib][swing]javax.swing.text.GapContent.getString() throws different exceptions on Harmony
and RI
------------------------------------------------------------------------------------------------------

                 Key: HARMONY-2554
                 URL: http://issues.apache.org/jira/browse/HARMONY-2554
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Ilya Okomin
            Priority: Minor


Harmony throws unspecified StringIndexOutOfBoundsException for javax.swing.text.GapContent.getString(int
where,int len) while Ri throws
specified BadLocationException. Check output of the test case test.java.

-------------- test.java -------------
import javax.swing.text.BadLocationException;
import javax.swing.text.GapContent;

public class test {
    public static void main(String args[]) {
        try {
            GapContent localGapContent = new GapContent();
            localGapContent.getString(3, Integer.MAX_VALUE);
        } catch (BadLocationException unexpectedException) {
            unexpectedException.printStackTrace();
        }
    }
}
---------------------------------------------
Output Harmony:
=============
Uncaught exception in main:
java.lang.StringIndexOutOfBoundsException
	at java.lang.String.<init>(String.java:456)
	at javax.swing.text.Segment.toString(Segment.java:145)
	at javax.swing.text.GapContent.getString(GapContent.java:185)
	at test.main(test.java:7)

Output RI:
========
javax.swing.text.BadLocationException: Invalid location
	at javax.swing.text.GapContent.getChars(GapContent.java:169)
	at javax.swing.text.GapContent.getString(GapContent.java:150)
	at test.main(test.java:8)


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

        

Mime
View raw message