harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-2554) [classlib][swing]javax.swing.text.GapContent.getString() throws different exceptions on Harmony and RI
Date Sat, 13 Jan 2007 16:25:27 GMT

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

Mark Hindess closed HARMONY-2554.
---------------------------------

    Resolution: Fixed
      Assignee: Mark Hindess

Fixed in duplicate jira, HARMONY-2566.



> [classlib][swing]javax.swing.text.GapContent.getString() throws different exceptions
on Harmony and RI
> ------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2554
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2554
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Ilya Okomin
>         Assigned To: Mark Hindess
>            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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message