--- old/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java 2016-08-08 16:37:39.000000000 -0700 +++ new/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java 2016-08-08 16:37:38.000000000 -0700 @@ -748,6 +748,14 @@ return localize(PrefixKind.COMPILER_MISC, key, args); } + public String localize(JCDiagnostic.DiagnosticInfo diagInfo) { + if (useRawMessages) { + return diagInfo.key(); + } else { + return messages.getLocalizedString(diagInfo.key(), diagInfo.args); + } + } + /** Find a localized string in the resource bundle. * @param key The key for the localized string. * @param args Fields to substitute into the string.