Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 86384 invoked from network); 8 May 2008 12:41:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 May 2008 12:41:37 -0000 Received: (qmail 35554 invoked by uid 500); 8 May 2008 12:41:37 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 35514 invoked by uid 500); 8 May 2008 12:41:37 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 35503 invoked by uid 99); 8 May 2008 12:41:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 05:41:37 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mccloud35@gmail.com designates 209.85.146.182 as permitted sender) Received: from [209.85.146.182] (HELO wa-out-1112.google.com) (209.85.146.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 12:40:52 +0000 Received: by wa-out-1112.google.com with SMTP id j5so1328851wah.18 for ; Thu, 08 May 2008 05:41:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=oAGwcdE+ugZU5FkAmrwuXJhHk64x3uIjPfx2oN8bbkY=; b=XiUMBdmMJ6By1Jg3BbcA7X9pwjY8W++Ry5UCTD1liEY07wqWn/qTaaL16k+YkkkKS+G2LTZC4y80WXPvWT+wDWDW+CEaFtLQw1uOHmCSBuJOc5hdkt+PhH1gWSlMj/94fOTnpBa4TvNwEFCRlpy+OHxVHDuNrR1Qnylwhle+Udg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=tsBKJcpwYzYzo81U0myZ6+CVMMfO/c7q2BxQ0p5+LqXO9e9Pl4dCMfV1M++8qoTk2iDpU4JzfXSAhHogmD2QD/VBtpZgIHIz3adhIXBG5cBjfF0SV/Gt2aiN8A8SCUhcUsUvbCYBO0P5oCwjzaCEb/E7WnaPuumI746B7zDbGoY= Received: by 10.114.126.1 with SMTP id y1mr3011851wac.41.1210250466904; Thu, 08 May 2008 05:41:06 -0700 (PDT) Received: by 10.114.108.5 with HTTP; Thu, 8 May 2008 05:41:06 -0700 (PDT) Message-ID: <61d2e9b20805080541q5a6a6b35t9f78e4ed625ee2d@mail.gmail.com> Date: Thu, 8 May 2008 18:11:06 +0530 From: "Mackie Mathew" To: dev@harmony.apache.org Subject: Re: RasterTest failure fixed In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_25_19113958.1210250466897" References: <61d2e9b20805080341m56e34edds5921093922262fd6@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_25_19113958.1210250466897 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I went through that before the change. When the buffer is small a RastorException: Data Buffer too small is thrown, which prevents the expected ArrayIndexOutOfBoundsException from being thrown. But when the Data Buffer's size is increased the expected exception is thrown. If I'm not mistaken the purpose of this test is to test getPixels() function with the Integer.MAX_VALUE, as mentioned in [1], not the Data Buffer size. On Thu, May 8, 2008 at 4:46 PM, Alexei Fedotov wrote: > Tharindu, thanks for your effort. > > I believe the buffer was intentionally small, see [1]. When the buffer > was small, the expected ArrayIndexOutOfBoundsException was not thrown, > was it? > > Thanks. > > [1] https://issues.apache.org/jira/browse/HARMONY-2875 > > On Thu, May 8, 2008 at 2:41 PM, Mackie Mathew wrote: > > RasterTest was failing because testGetPixels was failing. I was able to > pass > > the test with the following modfications: > > > > public void testGetPixels() { > > // Regression test for HARMONY-2875 > > try { > > Raster raster = Raster.createRaster(new BandedSampleModel(1, > 2, > > 3, 4), > > new DataBufferByte(new byte[191], *6)*, > > new Point(new Point(28, 43))); > > > > raster.getPixels(6, > > Integer.MAX_VALUE, 1, 0, new int[] {}); > > fail("ArrayIndexOutOfBoundsException should be thrown"); > > //$NON-NLS-1$ > > } catch (ArrayIndexOutOfBoundsException e) { > > // expected > > } > > > > > > The test was failing because the DataBuffer size was too small. When it > was > > increased from 5 to 6, the test passed. Is this fix acceptable? > > -- > > Regards, > > > > Tharindu > > > > > > -- > With best regards, > Alexei > -- Regards, Tharindu ------=_Part_25_19113958.1210250466897--