Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 61482 invoked from network); 1 Feb 2007 14:43:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Feb 2007 14:43:26 -0000 Received: (qmail 92862 invoked by uid 500); 1 Feb 2007 14:43:33 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 92766 invoked by uid 500); 1 Feb 2007 14:43:32 -0000 Mailing-List: contact commits-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 commits@harmony.apache.org Received: (qmail 92757 invoked by uid 99); 1 Feb 2007 14:43:32 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Feb 2007 06:43:32 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Feb 2007 06:43:25 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C56787142B6 for ; Thu, 1 Feb 2007 06:43:05 -0800 (PST) Message-ID: <25405295.1170340985806.JavaMail.jira@brutus> Date: Thu, 1 Feb 2007 06:43:05 -0800 (PST) From: "Andrey Pavlenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-2656) [classlib][awt] Compatibility: java.awt.AreaAveragingScaleFilter.setPixels() throws different Exceptions on RI and Harmony when the height is negative In-Reply-To: <29385499.1165940001047.JavaMail.jira@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 [ https://issues.apache.org/jira/browse/HARMONY-2656?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469441 ] Andrey Pavlenko commented on HARMONY-2656: ------------------------------------------ Alexei, the patches have been applied as expected, you can close the issue. Thanks. > [classlib][awt] Compatibility: java.awt.AreaAveragingScaleFilter.setPixels() throws different Exceptions on RI and Harmony when the height is negative > ------------------------------------------------------------------------------------------------------------------------------------------------------ > > Key: HARMONY-2656 > URL: https://issues.apache.org/jira/browse/HARMONY-2656 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Ilya Okomin > Assigned To: Alexei Zakharov > Priority: Minor > Attachments: HARMONY-2656-AreaAveragingScaleFilterTest.patch, HARMONY-2656-ReplicateScaleFilter.patch > > > java.awt.AreaAveragingScaleFilter.setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize) > on Harmony throws NegativeArraySizeException with incorrect height parmeters. RI throws IndexOutOfBoundsException. > See test case to reproduce: > ---------- test.java ----------- > import java.awt.image.AreaAveragingScaleFilter; > import java.awt.image.ColorModel; > import junit.framework.TestCase; > import junit.textui.TestRunner; > public class test extends TestCase { > public static void main(String args[]) { > TestRunner.run(test.class); > } > public void testRun() { > int width = 143; > int height = -1; > int x = 1; > int y = 1; > int w = 1; > int h = 1; > int[] pixels = new int[] {}; > AreaAveragingScaleFilter locAASF = new AreaAveragingScaleFilter(width, > height); > int off = 2; > int scansize = 1; > try { > locAASF.setPixels(x, y, w, h, (ColorModel) null, pixels, off, > scansize); > fail("IndexOutOfBoundsException expected"); > } catch (IndexOutOfBoundsException e) { > // expected > } > } > } > -------------------------- > Output RI: > ======== > . > Time: 0,1 > OK (1 test) > Output Harmony: > ============= > .E > Time: 0.04 > There was 1 error: > 1) testRun(test)java.lang.NegativeArraySizeException > at java.awt.image.ReplicateScaleFilter.initArrays(ReplicateScaleFilter.java:172) > at java.awt.image.ReplicateScaleFilter.setPixels(ReplicateScaleFilter.java:82) > at java.awt.image.AreaAveragingScaleFilter.setPixels(AreaAveragingScaleFilter.java:55) > at test.testRun(test.java:25) > at java.lang.reflect.VMReflection.invokeMethod(Native Method) > at test.main(test.java:10) > FAILURES!!! > Tests run: 1, Failures: 0, Errors: 1 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.