--- old/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java 2016-04-28 23:00:17.068214895 +0300 +++ new/src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java 2016-04-28 23:00:16.948215542 +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");