Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 32851 invoked from network); 16 Oct 2006 12:35:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Oct 2006 12:35:30 -0000 Received: (qmail 38620 invoked by uid 500); 16 Oct 2006 12:35:29 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 38598 invoked by uid 500); 16 Oct 2006 12:35:29 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 38587 invoked by uid 99); 16 Oct 2006 12:35:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 05:35:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2006 05:35:28 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 847EC7142D2 for ; Mon, 16 Oct 2006 05:34:39 -0700 (PDT) Message-ID: <25863151.1161002079540.JavaMail.jira@brutus> Date: Mon, 16 Oct 2006 05:34:39 -0700 (PDT) From: "Alexey A. Ivanov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1745) [classlib][swing] javax.swing.text.CompositeView.getView(int n) throws unspecified ArrayIndexOutOfBoundsException In-Reply-To: <28557698.1160132360969.JavaMail.root@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1745?page=comments#action_12442583 ] Alexey A. Ivanov commented on HARMONY-1745: ------------------------------------------- I've opened a discussion on the mailing list: http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200610.mbox/%3c8E389A5F2FEABA4CB1DEC35A25CB39CE5937B0@mssmsx411%3e > [classlib][swing] javax.swing.text.CompositeView.getView(int n) throws unspecified ArrayIndexOutOfBoundsException > ----------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1745 > URL: http://issues.apache.org/jira/browse/HARMONY-1745 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Aleksey Victorivich Yantsen > Priority: Minor > Attachments: patch1745.txt > > > Problem: CompositeView.getView(int) throws unspecified ArrayIndexOutOfBoundsException while RI does not. > Test to reproduce: > import junit.framework.TestCase; > import javax.swing.text.Element; > import javax.swing.text.ParagraphView; > import javax.swing.text.View; > import javax.swing.text.html.HTMLDocument; > public class Test extends TestCase { > public void testcase() { > HTMLDocument doc = new HTMLDocument(); > Element localElement = doc.getDefaultRootElement(); > ParagraphView pv = new ParagraphView(localElement); > View v = null; > try { > v = pv.getView(0); > } catch (ArrayIndexOutOfBoundsException e) { > e.printStackTrace(); > fail("Got unexpected ArrayIndexOutOfBoundsException : " + e); > } > } > } > Output on Sun 1.5: > ================== > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > . > Time: 0.125 > OK (1 test) > Output on Harmony: > ================== > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r453471, (Oct 6 2006), Windows/ia32/msvc 1310, release build > http://incubator.apache.org/harmony > .java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 > at javax.swing.text.CompositeView.getView(CompositeView.java:56) > at Test.testcase(Test.java:16) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > at java.lang.reflect.Method.invoke(Method.java:258) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:16) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:19) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:28) > at junit.framework.TestSuite.run(TestSuite.java:23) > at junit.textui.TestRunner.doRun(TestRunner.java:116) > at junit.textui.TestRunner.start(TestRunner.java:172) > at junit.textui.TestRunner.main(TestRunner.java:138) > F > Time: 0.407 > There was 1 failure: > 1) testcase(Test)junit.framework.AssertionFailedError: Got unexpected ArrayIndexOutOfBoundsException : java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 > at Test.testcase(Test.java:19) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > FAILURES!!! > Tests run: 1, Failures: 1, Errors: 0 -- 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