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] Updated: (HARMONY-1809) [classlib][swing]javax.swing.text.GapContent.replace(int, int, java.lang.Object, int) throws unspescified BadLocationException
Date Wed, 01 Nov 2006 14:50:55 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1809?page=all ]

Alexey A. Ivanov updated HARMONY-1809:
--------------------------------------

    Attachment: HTest1809.java

This is test which demonstrates weird behaviour of GapContent.replace.

------- RI output (BEA JRockit 1.5) -------
text: 'xt
'
start = -2, end =5
java.lang.ArrayIndexOutOfBoundsException
	at java.lang.System.arraycopy(Ljava.lang.Object;ILjava.lang.Object;II)V(Unknown Source)
	at javax.swing.text.GapVector.shiftGap(GapVector.java:251)
	at javax.swing.text.GapContent.shiftGap(GapContent.java:366)
	at javax.swing.text.GapVector.open(GapVector.java:181)
	at javax.swing.text.GapVector.replace(GapVector.java:125)
	at javax.swing.text.GapContent.insertString(GapContent.java:115)
	at HTest1809.main(HTest1809.java:10)
===============

------- Harmony output (where replace throws BadLocationException) -------
javax.swing.text.BadLocationException: Invalid remove position
	at javax.swing.text.GapContent.removeItems(GapContent.java:392)
	at javax.swing.text.GapContent.replace(GapContent.java:242)
	at HTest1809$MyGC.callReplace(HTest1809.java:21)
	at HTest1809.main(HTest1809.java:7)
text: 'text
'
start = 4, end =9
after insert: 'Stext
'
===============

------- Harmony output (where replace merely swallows BLE; as proposed in HARMONY-1975) -------
text: 'text
'
start = 4, end =9
after insert: 'Stext
'
===============


As for Harmony it doesn't modifies the contents in both cases, and the GapContent object remains
usable. At the same time RI, performs replace updating content but the object becomes unusable.

> [classlib][swing]javax.swing.text.GapContent.replace(int, int, java.lang.Object, int)
throws unspescified BadLocationException
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1809
>                 URL: http://issues.apache.org/jira/browse/HARMONY-1809
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Svetlana Samoilenko
>            Priority: Trivial
>         Attachments: GapContent.patch, HTest1809.java
>
>
> RI does not throw javax.swing.text.BadLocationException for GapContent.replace(int, int,
java.lang.Object, int) while Harmony does.

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