langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
changeset 5016 ff5e6791d0bb
parent 3380 a6c2bcab0fec
child 5520 86e4b9a9da40
equal deleted inserted replaced
5014:3651144e76f0 5016:ff5e6791d0bb
   199     }
   199     }
   200 
   200 
   201     private String selectFormat(JCDiagnostic d) {
   201     private String selectFormat(JCDiagnostic d) {
   202         DiagnosticSource source = d.getDiagnosticSource();
   202         DiagnosticSource source = d.getDiagnosticSource();
   203         String format = getConfiguration().getFormat(BasicFormatKind.DEFAULT_NO_POS_FORMAT);
   203         String format = getConfiguration().getFormat(BasicFormatKind.DEFAULT_NO_POS_FORMAT);
   204         if (source != null) {
   204         if (source != null && source != DiagnosticSource.NO_SOURCE) {
   205             if (d.getIntPosition() != Position.NOPOS) {
   205             if (d.getIntPosition() != Position.NOPOS) {
   206                 format = getConfiguration().getFormat(BasicFormatKind.DEFAULT_POS_FORMAT);
   206                 format = getConfiguration().getFormat(BasicFormatKind.DEFAULT_POS_FORMAT);
   207             } else if (source.getFile() != null &&
   207             } else if (source.getFile() != null &&
   208                        source.getFile().getKind() == JavaFileObject.Kind.CLASS) {
   208                        source.getFile().getKind() == JavaFileObject.Kind.CLASS) {
   209                 format = getConfiguration().getFormat(BasicFormatKind.DEFAULT_CLASS_FORMAT);
   209                 format = getConfiguration().getFormat(BasicFormatKind.DEFAULT_CLASS_FORMAT);