Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 44119 invoked from network); 19 Dec 2006 10:35:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2006 10:35:44 -0000 Received: (qmail 88122 invoked by uid 500); 19 Dec 2006 10:35:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 88102 invoked by uid 500); 19 Dec 2006 10:35:51 -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 88092 invoked by uid 99); 19 Dec 2006 10:35:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Dec 2006 02:35:51 -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; Tue, 19 Dec 2006 02:35:43 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5630F714293 for ; Tue, 19 Dec 2006 02:35:23 -0800 (PST) Message-ID: <10965491.1166524523350.JavaMail.jira@brutus> Date: Tue, 19 Dec 2006 02:35:23 -0800 (PST) From: "Alexey Petrenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-1632) [classlib][awt]Compatibility: java.awt.image.LookupOp.filter() throws ArrayIndexOutOfBoundsException while RI throws IllegalArgumentException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/HARMONY-1632?page=all ] Alexey Petrenko reassigned HARMONY-1632: ---------------------------------------- Assignee: Alexey Petrenko > [classlib][awt]Compatibility: java.awt.image.LookupOp.filter() throws ArrayIndexOutOfBoundsException while RI throws IllegalArgumentException > --------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1632 > URL: http://issues.apache.org/jira/browse/HARMONY-1632 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Ilya Okomin > Assigned To: Alexey Petrenko > Priority: Minor > Attachments: Harmony-1632-test.patch, Harmony-1632.patch > > > Harmony throws unspecified ArrayIndexOutOfBoundsException for java.awt.image.LookupOp.filter(BufferedImage src,BufferedImage dst) and java.awt.image.LookupOp.filter(Raster src, WritableRaster dst) while RI throws IllegalArgumentException. It is the case when src and dst have different width or height. > Spec says nothing about the exceptions when width or height of dst and src are not equals however RI has checks for these parameters. It is a Exception throwing compatibility issue. > Test to reproduce: > ----------------test.java------------------- > import java.awt.image.LookupOp; > import java.awt.image.ByteLookupTable; > import java.awt.image.BufferedImage; > public class test { > public static BufferedImage getImage(int w, int h) { > return new BufferedImage(w, h, BufferedImage.TYPE_4BYTE_ABGR); > } > public static void main(String[] args) { > byte[] array0 = new byte[96]; > ByteLookupTable localByteLookupTable = new ByteLookupTable(1, array0); > LookupOp localLookupOp = new LookupOp(localByteLookupTable, null); > BufferedImage localBufferedImage = getImage(5069, 19); > BufferedImage localBufferedImage1 = getImage(6, 19); > try { > localLookupOp.filter(localBufferedImage, localBufferedImage1); > } catch (Exception e) { > System.out.println("filter(BI,BI) non-equal widths: " + e + " was thrown"); > } > try { > localLookupOp.filter(localBufferedImage.getRaster(), localBufferedImage1.getRaster()); > } catch (Exception e) { > System.out.println("filter(WR,R) non-equal widths: " + e + " was thrown"); > } > localBufferedImage1 = getImage(5069, 5); > try { > localLookupOp.filter(localBufferedImage, localBufferedImage1); > } catch (Exception e) { > System.out.println("filter(BI,BI) non-equal heights: " + e + " was thrown"); > } > > try { > localLookupOp.filter(localBufferedImage.getRaster(), localBufferedImage1.getRaster()); > } catch (Exception e) { > System.out.println("filter(WR,R) non-equal heights: " + e + " was thrown"); > } > } > } > ------------------------------------------------------- > ====== Output RI ======= > filter(BI,BI) non-equal widths: java.lang.IllegalArgumentException: Src width (5069) not equal to dst width (6) was thrown > filter(WR,R) non-equal widths: java.lang.IllegalArgumentException: Width or height of Rasters do not match was thrown > filter(BI,BI) non-equal heights: java.lang.IllegalArgumentException: Src height (19) not equal to dst height (5) was thrown > filter(WR,R) non-equal heights: java.lang.IllegalArgumentException: Width or height of Rasters do not match was thrown > ====== Output Harmony ====== > filter(BI,BI) non-equal widths: java.lang.ArrayIndexOutOfBoundsException was thrown > filter(WR,R) non-equal widths: java.lang.ArrayIndexOutOfBoundsException was thrown > filter(BI,BI) non-equal heights: java.lang.ArrayIndexOutOfBoundsException was thrown > filter(WR,R) non-equal heights: java.lang.ArrayIndexOutOfBoundsException was thrown -- 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