langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java
changeset 40308 274367a99f98
parent 40232 4995ab1a4558
child 40504 0a01f6710c84
equal deleted inserted replaced
40306:1a0fcaf3f2ed 40308:274367a99f98
   746      */
   746      */
   747     public String localize(String key, Object... args) {
   747     public String localize(String key, Object... args) {
   748         return localize(PrefixKind.COMPILER_MISC, key, args);
   748         return localize(PrefixKind.COMPILER_MISC, key, args);
   749     }
   749     }
   750 
   750 
       
   751     public String localize(JCDiagnostic.DiagnosticInfo diagInfo) {
       
   752         if (useRawMessages) {
       
   753             return diagInfo.key();
       
   754         } else {
       
   755             return messages.getLocalizedString(diagInfo.key(), diagInfo.args);
       
   756         }
       
   757     }
       
   758 
   751     /** Find a localized string in the resource bundle.
   759     /** Find a localized string in the resource bundle.
   752      *  @param key    The key for the localized string.
   760      *  @param key    The key for the localized string.
   753      *  @param args   Fields to substitute into the string.
   761      *  @param args   Fields to substitute into the string.
   754      */
   762      */
   755     public String localize(PrefixKind pk, String key, Object... args) {
   763     public String localize(PrefixKind pk, String key, Object... args) {