harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-2757) [classlib][awt] java.awt.image.RasterFormatException.createBandedRaster(int dataType,int w,int h,int scanlineStride,int[] bankIndices,int[] bandOffsets,Point location) throws RasterFormatException while RI throws IllegalArgumentException
Date Thu, 12 Jul 2007 08:32:04 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Petrenko reassigned HARMONY-2757:
----------------------------------------

    Assignee: Alexey Petrenko

> [classlib][awt] java.awt.image.RasterFormatException.createBandedRaster(int dataType,int
w,int h,int scanlineStride,int[] bankIndices,int[] bandOffsets,Point location) throws RasterFormatException
while RI throws IllegalArgumentException
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2757
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2757
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Oleg Khaschansky
>            Assignee: Alexey Petrenko
>            Priority: Minor
>
> The following Raster methods should throw RasterFormatException if w or h is less than
or equal to zero according to the API spec:
> createBandedRaster(int dataType,int w,int h,int scanlineStride,int[] bankIndices,int[]
bandOffsets,Point location)
> createPackedRaster(int dataType,int w,int h,int bands,int bitsPerBand,Point location)
> createInterleavedRaster(DataBuffer dataBuffer, int w, int h, int scanlineStride, int
pixelStride, int[] bandOffsets, Point location)
> createInterleavedRaster(int,int,int,int,int,int[],Point)
> They follow the specification on Harmony, but RI implementation throw unspecified IllegalArgumentException
in this case.
> The following testcase demonstrates this behavior (passes on RI but fails on Harmony):
> package java.awt.image;
> import junit.framework.TestCase;
> import java.awt.*;
> public class RasterTest extends TestCase {
>     public void testcase0() {
>         try {
>             Raster.createBandedRaster(1, -10, 10, 10, new int[] {0}, new int[] {0}, new
Point());
>             fail("Exception expected");
>         } catch (RasterFormatException expectedException) {
>             fail(expectedException +" was thrown");
>         } catch (IllegalArgumentException expectedException) {
>             System.out.println(expectedException +" was thrown");
>         }
>     }
> }
> I think Harmony should folow specification in this case and suggest to treat it as a
non-bug difference.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message