diff -r ca27d64d6a87 src/java.base/share/classes/java/lang/String.java --- a/src/java.base/share/classes/java/lang/String.java Tue Oct 13 15:02:58 2015 +0200 +++ b/src/java.base/share/classes/java/lang/String.java Tue Oct 13 21:21:48 2015 +0300 @@ -167,11 +167,18 @@ * * Implementation note: an actual value for this field is injected by JVM. * In order to communicate that this static final field is not statically - * foldable, we are using the idiomatic expression recommended by JLS 13.4.9. - * It does not matter if we initialize this field with either "true" or "false" - * here. + * foldable, we are using the static initializer that sets the value. We + * cannot do anything else apart from calling a native method into the VM, + * because any Java call can and will build a circular dependency on a String + * back, with devastating results. + * + * It does not matter if we initialize this field with either "true" or "false". */ - static final boolean COMPACT_STRINGS = new Boolean(true).booleanValue(); + static final boolean COMPACT_STRINGS; + + static { + COMPACT_STRINGS = true; + } /** * Class String is special cased within the Serialization Stream Protocol.