harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Khaschansky (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2547) [classlib][awt] PointerPointer's methods set/get, set/getAddress don't use pointer size.
Date Fri, 08 Dec 2006 13:58:22 GMT
[classlib][awt] PointerPointer's methods set/get, set/getAddress don't use pointer size.
----------------------------------------------------------------------------------------

                 Key: HARMONY-2547
                 URL: http://issues.apache.org/jira/browse/HARMONY-2547
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Oleg Khaschansky


The following methods of org.apache.harmony.awt.nativebridge.PointerPointer
don't multiply index to elemnt size PP_SIZE_FACTOR: set(int, VoidPointer),
get(int), setAddress(int, long), getAddress(int).

Here's a small testcase:

import org.apache.harmony.awt.nativebridge.NativeBridge;
import org.apache.harmony.awt.nativebridge.PointerPointer;

public class PointerPointerTest {
    public static void main(String[] args) {
        PointerPointer p = NativeBridge.getInstance().createPointerPointer(2, false);
        p.setAddress(0, 0xFFFFFFFF);
        System.out.println("*(p+1) = " + Long.toHexString(p.getAddress(1)) + " should be 0");
    }
}

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