[ https://issues.apache.org/jira/browse/HARMONY-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexey Petrenko closed HARMONY-2757.
------------------------------------
Resolution: Won't Fix
Closed as non bug difference
http://mail-archives.apache.org/mod_mbox/harmony-dev/200707.mbox/%3cc3755b3a0707120617tf990260s9afa7838d3d0be5f@mail.gmail.com%3e
> [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.
|