Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 53852 invoked from network); 8 May 2008 11:16:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 May 2008 11:16:46 -0000 Received: (qmail 21292 invoked by uid 500); 8 May 2008 11:16:46 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 21251 invoked by uid 500); 8 May 2008 11:16:46 -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 21236 invoked by uid 99); 8 May 2008 11:16:46 -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 04:16:46 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alexei.fedotov@gmail.com designates 209.85.200.173 as permitted sender) Received: from [209.85.200.173] (HELO wf-out-1314.google.com) (209.85.200.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 11:16:01 +0000 Received: by wf-out-1314.google.com with SMTP id 28so727879wfc.24 for ; Thu, 08 May 2008 04:16:15 -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:content-transfer-encoding:content-disposition:references; bh=GzneDZP8MI/qkhaYrZEuHEdWI3NdvlcXFjy91Nu5Rcg=; b=gKmfu7uobvALKv1LXgW8rXouc5G8N0jfAU+cBCXwMcjNLungzhdCnCghFZREL+GtKrMW6vRcTrfqm9YrFiHjlvxmcV0rHSpGAktPhhJ575Tpt7BAwqX02uKFo8Y7DKkiGTHLwYOVC2D5DXN4rSao0mAdQEwkiFCCEIA2G8rAvPY= 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:content-transfer-encoding:content-disposition:references; b=NHvfHGNOs9cvJ93bRNWfUEo8lvwjqH8rLAn+jvewb3YoozWD5dmkNvQtnHaOlFSPoPfpfOmxH6YcP42Vn+27Tj1Ea9XDMs5NvtLvn7d1aaRB6viskwh0wwRVZXHCygpt0GHEDlhaAmkCKzGP9rnlRJgUZJEK+MraAuZJ9RFAAKk= Received: by 10.142.232.20 with SMTP id e20mr1345036wfh.198.1210245375635; Thu, 08 May 2008 04:16:15 -0700 (PDT) Received: by 10.142.155.15 with HTTP; Thu, 8 May 2008 04:16:15 -0700 (PDT) Message-ID: Date: Thu, 8 May 2008 15:16:15 +0400 From: "Alexei Fedotov" To: dev@harmony.apache.org Subject: Re: RasterTest failure fixed In-Reply-To: <61d2e9b20805080341m56e34edds5921093922262fd6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <61d2e9b20805080341m56e34edds5921093922262fd6@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org 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