Cannot change static final field using java reflection?
<p>I recently stumbled upon <a href="http://stackoverflow.com/questions/3301635/change-private-static-final-field-using-java-reflection">change private static final field using java reflection</a> and tested polygenelubricants' EverythingIsTrue class, works fine, <code>System.out.format("Everything is %s", false);</code> prints <code>Everything is true</code> indeed. But when I change the code as </p>

<pre><code>public class EverythingIsTrue {
    public static final boolean FALSE = false;

    static void setFinalStatic(Field field, Object newValue) throws Exception {
        field.setAccessible(true);
        Field modifiersField = Field.class.getDeclaredField("modifiers");
        modifiersField.setAccessible(true);
        modifiersField.setInt(field, field.getModifiers() &amp; ~Modifier.FINAL);
        field.set(null, newValue);
    }

    public static void main(String args[]) throws Exception {
        setFinalStatic(EverythingIsTrue.class.getField("FALSE"), true);
        System.out.format("Everything is %s", FALSE);
    }
}
</code></pre>

<p>it prints</p>

<pre><code>Everything is false
</code></pre>

<p>Does anybody know why? Does setFinalStatic actually work or not?</p>
