src/solaris/classes/sun/awt/X11/Native.java
Print this page
rev 9717 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by:
*** 41,54 ****
static int longSize;
static int dataModel;
static {
! String dataModelProp = (String)AccessController.
! doPrivileged(
! new PrivilegedAction() {
! public Object run() {
return System.getProperty("sun.arch.data.model");
}
});
try {
dataModel = Integer.parseInt(dataModelProp);
--- 41,53 ----
static int longSize;
static int dataModel;
static {
! String dataModelProp = AccessController.doPrivileged(
! new PrivilegedAction<String>() {
! public String run() {
return System.getProperty("sun.arch.data.model");
}
});
try {
dataModel = Integer.parseInt(dataModelProp);
*** 331,353 ****
/**
* Stores Java Vector of Longs into memory. Memory location is treated as array
* of native <code>long</code>s
*/
! static void putLong(long ptr, Vector arr) {
for (int i = 0; i < arr.size(); i ++, ptr += getLongSize()) {
! putLong(ptr, ((Long)arr.elementAt(i)).longValue());
}
}
/**
* Stores Java Vector of Longs into memory. Memory location is treated as array
* of native <code>long</code>s. Array is stored in reverse order
*/
! static void putLongReverse(long ptr, Vector arr) {
for (int i = arr.size()-1; i >= 0; i--, ptr += getLongSize()) {
! putLong(ptr, ((Long)arr.elementAt(i)).longValue());
}
}
/**
* Converts length bytes of data pointed by <code>data</code> into byte array
* Returns null if data is zero
--- 330,352 ----
/**
* Stores Java Vector of Longs into memory. Memory location is treated as array
* of native <code>long</code>s
*/
! static void putLong(long ptr, Vector<Long> arr) {
for (int i = 0; i < arr.size(); i ++, ptr += getLongSize()) {
! putLong(ptr, arr.elementAt(i).longValue());
}
}
/**
* Stores Java Vector of Longs into memory. Memory location is treated as array
* of native <code>long</code>s. Array is stored in reverse order
*/
! static void putLongReverse(long ptr, Vector<Long> arr) {
for (int i = arr.size()-1; i >= 0; i--, ptr += getLongSize()) {
! putLong(ptr, arr.elementAt(i).longValue());
}
}
/**
* Converts length bytes of data pointed by <code>data</code> into byte array
* Returns null if data is zero