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

Unified Diff: compiler/java/com/google/dart/compiler/ast/LibraryNode.java

Issue 11416307: Triage and fixes for co19 library tests. (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
Index: compiler/java/com/google/dart/compiler/ast/LibraryNode.java
diff --git a/compiler/java/com/google/dart/compiler/ast/LibraryNode.java b/compiler/java/com/google/dart/compiler/ast/LibraryNode.java
index 5a98e6682828c21988190a7f2792c2690e757020..c9ce360b7d7173887850e69ea415dd784a5e2c58 100644
--- a/compiler/java/com/google/dart/compiler/ast/LibraryNode.java
+++ b/compiler/java/com/google/dart/compiler/ast/LibraryNode.java
@@ -6,6 +6,7 @@ package com.google.dart.compiler.ast;
import com.google.common.collect.ImmutableList;
import com.google.dart.compiler.common.AbstractNode;
+import com.google.dart.compiler.util.apache.StringUtils;
import java.util.List;
@@ -26,7 +27,7 @@ public class LibraryNode extends AbstractNode {
* @param text the text comprising the node (not <code>null</code>)
*/
public LibraryNode(String text) {
- this.text = text;
+ this.text = StringUtils.trim(text);
this.prefix = null;
this.combinators = ImmutableList.<ImportCombinator>of();
this.exported = false;
@@ -34,7 +35,7 @@ public class LibraryNode extends AbstractNode {
public LibraryNode(DartImportDirective importDirective) {
setSourceInfo(importDirective.getSourceInfo());
- this.text = importDirective.getLibraryUri().getValue();
+ this.text = StringUtils.trim(importDirective.getLibraryUri().getValue());
this.prefix = importDirective.getPrefixValue();
this.combinators = importDirective.getCombinators();
this.exported = importDirective.isExported();
@@ -42,7 +43,7 @@ public class LibraryNode extends AbstractNode {
public LibraryNode(DartExportDirective exportDirective) {
setSourceInfo(exportDirective.getSourceInfo());
- this.text = exportDirective.getLibraryUri().getValue();
+ this.text = StringUtils.trim(exportDirective.getLibraryUri().getValue());
this.prefix = null;
this.combinators = exportDirective.getCombinators();
this.exported = false;

Powered by Google App Engine
This is Rietveld 408576698