harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko" <dkishe...@gmail.com>
Subject Re: [class][awt] RI bug??? BufferedImage.isTileWritable(int,int) throws IllegalArgumentException while Harmony throws ArrayIndexOutOfBoundsException
Date Tue, 03 Oct 2006 09:24:26 GMT
Andrew thanks for answer.

I have checked RI 1.4 behavior and spec, it's the same -
IllegalArgumentException. May be it's just JavaDoc mistake.

> RI and mark this issue as "Non-bug differences from spec" as
> exception-throwing guideline[1] suggests. Thanks!
Unfortunatelly JIRA hasn't such category.

So I will fix this issue.

2006/10/3, Andrew Zhang <zhanghuangzhu@gmail.com>:
> On 10/2/06, Denis Kishenko <dkishenko@gmail.com> wrote:
> >
> > Seems this is RI bug.
>
>
> Apparently, RI doesn't comply with spec this time. But I think
> IllealArgumentException is also acceptable. Therefore, I suggest to follow
> RI and mark this issue as "Non-bug differences from spec" as
> exception-throwing guideline[1] suggests. Thanks!
>
> [1]
> http://incubator.apache.org/harmony/subcomponents/classlibrary/compat.html
>
>
> > RI implementation of BufferedImage.isTileWritable(int,int) throws
> > IllegalArgumentException while Harmony throws
> > ArrayIndexOutOfBoundsException to follow spec.
> >
> > ========== Spec =============
> > public boolean isTileWritable(int tileX, int tileY)
> > Throws:
> > ArrayIndexOutOfBoundsException - if both tileX and tileY are not equal to
> > 0
> >
> > ============ Test ================
> > import java.awt.image.*;
> >
> > public class Test {
> >   public static void main(String[] argv) {
> >       BufferedImage img = new BufferedImage(10, 16,
> > BufferedImage.TYPE_4BYTE_ABGR);
> >       img.isTileWritable(1,1);
> >   }
> > }
> >
> > ========== RI output =============
> > java.lang.IllegalArgumentException: Only 1 tile in image
> >   at java.awt.image.BufferedImage.isTileWritable(BufferedImage.java:1526)
> >   at Test.main(Test.java:6)
> >
> > ========= Harmony output ========
> > java.lang.ArrayIndexOutOfBoundsException: Both tileX and tileY are not
> > equal to 0
> >   at java.awt.image.BufferedImage.isTileWritable(BufferedImage.java:603)
> >
> > So I have filed issue as non-bug.
> >
> > Any comments?
> >
> > 2006/10/2, Denis Kishenko (JIRA) <jira@apache.org>:
> > > [class][awt] BufferedImage.isTileWritable(int,int) throws
> > IllegalArgumentException while Harmony throws ArrayIndexOutOfBoundsException
> > >
> > ----------------------------------------------------------------------------------------------------------------------------------------
> > >
> > >                 Key: HARMONY-1658
> > >                 URL: http://issues.apache.org/jira/browse/HARMONY-1658
> > >             Project: Harmony
> > >          Issue Type: Bug
> > >          Components: Non-bug differences from RI
> > >            Reporter: Denis Kishenko
> > >
> > >
> > > RI implementation of BufferedImage.isTileWritable(int,int) throws
> > IllegalArgumentException while Harmony throws ArrayIndexOutOfBoundsException
> > to follow spec.
> > >
> > > ========== Spec =============
> > > public boolean isTileWritable(int tileX, int tileY)
> > > Throws:
> > > ArrayIndexOutOfBoundsException - if both tileX and tileY are not equal
> > to 0
> > >
> > > ============ Test ================
> > > import java.awt.image.*;
> > >
> > > public class Test {
> > >    public static void main(String[] argv) {
> > >        BufferedImage img = new BufferedImage(10, 16,
> > BufferedImage.TYPE_4BYTE_ABGR);
> > >        img.isTileWritable(1,1);
> > >    }
> > > }
> > >
> > > ========== RI output =============
> > > java.lang.IllegalArgumentException: Only 1 tile in image
> > >    at java.awt.image.BufferedImage.isTileWritable(BufferedImage.java
> > :1526)
> > >    at Test.main(Test.java:6)
> > >
> > > ========= Harmony output ========
> > > java.lang.ArrayIndexOutOfBoundsException: Both tileX and tileY are not
> > equal to 0
> > >    at java.awt.image.BufferedImage.isTileWritable(BufferedImage.java
> > :603)
> > >
> > >
> > > --
> > > 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
> > >
> > >
> > >
> >
> >
> > --
> > Denis M. Kishenko
> > Intel Middleware Products Division
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Best regards,
> Andrew Zhang
>
>


-- 
Denis M. Kishenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message