|
Description
|
The following simple test fails:
import java.lang.reflect.*;
public class TestField {
final public int g = 3;
public static void main(String[] args) throws Exception {
TestField t = new TestField();
Field f = t.getClass().getField("g");
f.setAccessible(true);
f.set(t, 4);
System.out.println(t.g);
}
}
See the last comment at http://jira.codehaus.org/browse/XSTR-379
|
The following simple test fails:
import java.lang.reflect.*;
public class TestField {
final public int g = 3;
public static void main(String[] args) throws Exception {
TestField t = new TestField();
Field f = t.getClass().getField("g");
f.setAccessible(true);
f.setInt(t, 4);
System.out.println(t.g);
}
}
See the last comment at http://jira.codehaus.org/browse/XSTR-379
|
By the way, IBM VME makes the same mistake.