mirror of
https://github.com/corda/corda.git
synced 2025-06-23 09:25:36 +00:00
fix handling of 64-bit arguments to Method.invoke on 32-bit architectures
The previous code failed to account for alignment padding in the Double and Long classes.
This commit is contained in:
@ -83,7 +83,25 @@ public class Floats {
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
public static class Rectangle {
|
||||
public double x;
|
||||
public double y;
|
||||
public double width;
|
||||
public double height;
|
||||
|
||||
public void setX(double x) {
|
||||
this.x = x;
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
expect(new Double(42.0) == 42.0);
|
||||
|
||||
{ Rectangle r = new Rectangle();
|
||||
Rectangle.class.getMethod("setX", double.class).invoke(r, 42.0);
|
||||
expect(r.x == 42.0);
|
||||
}
|
||||
|
||||
{ double input[] = new double[8];
|
||||
double left[] = new double[8];
|
||||
double right[] = new double[8];
|
||||
|
Reference in New Issue
Block a user