[ http://issues.apache.org/jira/browse/HARMONY-1445?page=all ]
Denis Kishenko updated HARMONY-1445:
------------------------------------
Attachment: 1445-Polygon.patch
patch + test
> [classlib][awt] java.awt.Polygon(int[] , int[], int) doesn't copy array parameters
> ----------------------------------------------------------------------------------
>
> Key: HARMONY-1445
> URL: http://issues.apache.org/jira/browse/HARMONY-1445
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Attachments: 1445-Polygon.patch
>
>
> Harmony implementation of java.awt.Polygon(int[] , int[], int) doesn't copy array parameters
so immutable class Polygon can be modified after creation.
> =========== Test.java ===============
> import java.awt.*;
> public class Test {
> static public void main(String[] args) {
> int[] x = new int[]{1, 2, 3, 4, 5, 6};
> int[] y = new int[]{7, 8, 9, 10, 11, 12};
> Polygon pg = new Polygon(x, y, 3);
> x[1] = 99;
> System.out.println(pg.xpoints[1]);
> }
> }
> ======== RI =============
> 2
> ======== Harmony =======
> 99
--
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
|