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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user