Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Unified Diff: compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java

Issue 11366078: Report error for deprecated #library #import #source (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
diff --git a/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java b/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
index f38dde89ece35840a47ac01af35a958484903fc2..bbf38517f972c044c5efff6a1a1b873aab3945a4 100644
--- a/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
+++ b/compiler/java/com/google/dart/compiler/DefaultErrorFormatter.java
@@ -4,6 +4,7 @@
package com.google.dart.compiler;
+import com.google.common.base.Objects;
import com.google.dart.compiler.CompilerConfiguration.ErrorFormat;
import java.io.PrintStream;
@@ -42,7 +43,7 @@ public class DefaultErrorFormatter implements ErrorFormatter {
String includeFrom = "";
if (sourceFile instanceof DartSource) {
LibrarySource lib = ((DartSource) sourceFile).getLibrary();
- if (!sourceFile.getUri().equals(lib.getUri())) {
+ if (lib != null && !Objects.equal(sourceFile.getUri(), lib.getUri())) {
includeFrom = " (sourced from " + lib.getUri() + ")";
}
}
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/parser/DartParser.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698