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