harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Loenko (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HARMONY-1445) [classlib][awt] java.awt.Polygon(int[] , int[], int) doesn't copy array parameters
Date Wed, 18 Oct 2006 04:52:40 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1445?page=all ]

Mikhail Loenko closed HARMONY-1445.
-----------------------------------


> [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
>         Assigned To: Mikhail Loenko
>         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

        

Mime
View raw message