You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ilya Okomin (JIRA)" <ji...@apache.org> on 2006/10/06 14:45:23 UTC
[jira] Updated: (HARMONY-1753) [classlib][swing]
javax.swing.text.GapContent.shiftEnd() throws unspecified
ArrayIndexOutOfBoundsException
[ http://issues.apache.org/jira/browse/HARMONY-1753?page=all ]
Ilya Okomin updated HARMONY-1753:
---------------------------------
Attachment: Harmony-1753-test.patch
Unit test
> [classlib][swing] javax.swing.text.GapContent.shiftEnd() throws unspecified ArrayIndexOutOfBoundsException
> ----------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1753
> URL: http://issues.apache.org/jira/browse/HARMONY-1753
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Ilya Okomin
> Priority: Minor
> Attachments: Harmony-1753-test.patch
>
>
> Harmony throws unspecified ArrayIndexOutOfBoundsException for javax.swing.text.GapContent.remove(-1) while RI works silently.
> ---------------test.java----------------
> import javax.swing.text.GapContent;
> import junit.framework.TestCase;
> public class test extends TestCase {
> public static void main(String[] args) {
> junit.textui.TestRunner.run(test.class);
> }
> public void testRun() throws Exception {
> GC localGapContent = new GC();
> localGapContent.testShifEnd(-1);
> }
> class GC extends GapContent {
> public GC() {
> super();
> }
>
> public int testShifEnd(int sh) {
> super.shiftEnd(sh);
> return 1;
> }
> }
> }
> --------------------------------------------
> ====== Output RI ======
> .
> Time: 0.04
> OK (1 test)
> ====== Output Harmony ======
> .E
> Time: 0.02
> There was 1 error:
> 1) testRun(bugzilla.Test9308.test)java.lang.ArrayIndexOutOfBoundsException: bad arrayCopy
> at java.lang.VMMemoryManager.arrayCopy(Native Method)
> at java.lang.System.arraycopy(Unknown Source)
> at javax.swing.text.GapContent.shiftEnd(GapContent.java:279)
> at bugzilla.Test9308.test$GC.testShifEnd(test.java:25)
> at bugzilla.Test9308.test.testRun(test.java:14)
> at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> at bugzilla.Test9308.test.main(test.java:10)
> FAILURES!!!
> Tests run: 1, Failures: 0, Errors: 1
> I've investigated this issue. Harmony and RI behaves differently only for size == -1. If the size value less than -1 both Harmony and RI throws
> java.lang.NegativeArraySizeException.
--
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