src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java

changeset 415
49359d0e6a9c
parent 302
18e0269f25e3
child 554
9d9f26857129
     1.1 --- a/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Wed Sep 23 18:29:41 2009 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Wed Sep 23 18:48:13 2009 -0700
     1.3 @@ -32,7 +32,6 @@
     1.4  import javax.tools.JavaFileObject;
     1.5  
     1.6  import com.sun.tools.javac.api.DiagnosticFormatter;
     1.7 -import com.sun.tools.javac.file.JavacFileManager;
     1.8  import com.sun.tools.javac.tree.JCTree;
     1.9  
    1.10  import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticType.*;
    1.11 @@ -354,15 +353,6 @@
    1.12      }
    1.13  
    1.14      /**
    1.15 -     * Get the name of the source file referred to by this diagnostic.
    1.16 -     * @return the name of the source referred to with this diagnostic, or null if none
    1.17 -     */
    1.18 -    public String getSourceName() {
    1.19 -        JavaFileObject s = getSource();
    1.20 -        return s == null ? null : JavacFileManager.getJavacFileName(s);
    1.21 -    }
    1.22 -
    1.23 -    /**
    1.24       * Get the source referred to by this diagnostic.
    1.25       * @return the source referred to with this diagnostic, or null if none
    1.26       */
    1.27 @@ -437,6 +427,7 @@
    1.28      /**
    1.29       * Return the standard presentation of this diagnostic.
    1.30       */
    1.31 +    @Override
    1.32      public String toString() {
    1.33          return defaultFormatter.format(this,Locale.getDefault());
    1.34      }

mercurial