diff -r 8c23079bd4a6 src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java --- a/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java Thu Apr 28 08:28:48 2016 -0700 +++ b/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java Thu Apr 28 22:42:18 2016 +0300 @@ -123,7 +123,7 @@ * Concatenation strategy to use. See {@link Strategy} for possible options. * This option is controllable with -Djava.lang.invoke.stringConcat JDK option. */ - private static final Strategy STRATEGY; + private static Strategy STRATEGY; /** * Default strategy to use for concatenation. @@ -187,6 +187,16 @@ private static final ProxyClassesDumper DUMPER; static { + // In case we need to double-back onto the StringConcatFactory during this + // static initialization, make sure we have the reasonable defaults to complete + // the static initialization properly. After that, actual users would use the + // the proper values we have read from the the properties. + STRATEGY = DEFAULT_STRATEGY; + // CACHE_ENABLE = false; // implied + // CACHE = null; // implied + // DEBUG = false; // implied + // DUMPER = null; // implied + Properties props = GetPropertyAction.getProperties(); final String strategy = props.getProperty("java.lang.invoke.stringConcat");