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] Closed: (HARMONY-1606) [classlib][awt] RI AffineTransform.transform(...) throws ArrayIndexOutOfBoundsException while Harmony doesn't
Date Tue, 30 Jan 2007 13:52:33 GMT

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

Alexey Petrenko closed HARMONY-1606.
------------------------------------

    Resolution: Won't Fix

Closed as non bug difference as agreed on dev list.

> [classlib][awt] RI AffineTransform.transform(...) throws ArrayIndexOutOfBoundsException
while Harmony doesn't
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1606
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1606
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>            Reporter: Denis Kishenko
>         Assigned To: Alexey Petrenko
>
> RI implementation of AffineTransform of transform(float[], int, float[], int, int) and
transform(double[], int, double[], int, int) methods throws ArrayIndexOutOfBoundsException
if offsets are out of buffer bounds and number of points to transform is zero. Harmony doesn't
throw any exception. Spec doesn't say about any exceptions. 
> As you see from stack trace RI call System.arraycopy(...) which throws exception because
of offset is really out of bounds. But Harmony implementation doesn't use System.arraycopy(...)
so we have difference in behavior.
> =========== Test.java ===============
> import java.awt.geom.AffineTransform;
> public class Test {
>     static public void main(String[] args) { 
>         AffineTransform t = new AffineTransform();
>         try {
>             t.transform(new float[] {}, 1, new float[] {}, 2, 0);
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>         try {
>             t.transform(new double[] {}, 1, new double[] {}, 2, 0);
>         } catch (Exception e) {
>             e.printStackTrace();
>         }
>     }
> }
> ========= RI =======================
> java.lang.ArrayIndexOutOfBoundsException
>     at java.lang.System.arraycopy(Ljava.lang.Object;ILjava.lang.Object;II)V(Unknown Source)
>     at java.awt.geom.AffineTransform.transform(AffineTransform.java:2308)
>     at Test.main(Test.java:10)
> java.lang.ArrayIndexOutOfBoundsException
>     at java.lang.System.arraycopy(Ljava.lang.Object;ILjava.lang.Object;II)V(Unknown Source)
>     at java.awt.geom.AffineTransform.transform(AffineTransform.java:2421)
>     at Test.main(Test.java:15)
> ======== Harmony ===============
> nothing

-- 
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