langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
equal
deleted
inserted
replaced
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); |