harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Denis Kishenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-1445) [classlib][awt] java.awt.Polygon(int[] , int[], int) doesn't copy array parameters
Date Tue, 12 Sep 2006 13:12:22 GMT
[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


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