Issue 1548. If URI can not be parsed, return null.

http://code.google.com/p/dart/issues/detail?id=1548

This is also specified in JavaDoc for this method.

R=danrubel@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9420011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4341 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
scheglov@google.com
2012-02-16 21:26:25 +00:00
parent 3a1a261452
commit d6e272b8e1
10 changed files with 126 additions and 64 deletions
@@ -38,20 +38,20 @@ class BundleLibrarySource extends UrlSource implements LibrarySource {
}
@Override
public LibrarySource getImportFor(String filename) {
public LibrarySource getImportFor(String relPath) {
try {
return new BundleLibrarySource(loader, basePath, filename);
return new BundleLibrarySource(loader, basePath, relPath);
} catch (URISyntaxException e) {
throw new AssertionError();
return null;
}
}
@Override
public DartSource getSourceFor(final String relPath) {
public DartSource getSourceFor(String relPath) {
try {
return new BundleDartSource(loader, basePath, relPath);
} catch (URISyntaxException e) {
throw new AssertionError(e);
return null;
}
}