| Index: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerWarmup.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerWarmup.java (revision 6614)
|
| +++ editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/utilities/compiler/DartCompilerWarmup.java (working copy)
|
| @@ -127,6 +127,9 @@
|
|
|
| @Override
|
| public LibrarySource getImportFor(String relPath) throws IOException {
|
| + if (relPath == null || relPath.isEmpty()) {
|
| + return null;
|
| + }
|
| return new UrlLibrarySource(getUri().resolve(relPath).normalize(), systemLibraryManager);
|
| }
|
|
|
| @@ -142,7 +145,7 @@
|
|
|
| @Override
|
| public DartSource getSourceFor(String relPath) {
|
| - if (relPath != null) {
|
| + if (relPath != null && !relPath.isEmpty()) {
|
| if (relPath.equals(dartSrc.getName())) {
|
| return dartSrc;
|
| }
|
| @@ -193,8 +196,8 @@
|
| /**
|
| * @see #warmUpCompiler()
|
| */
|
| - public static void warmUpCompiler(
|
| - CachingArtifactProvider rootProvider, DartCompilerListener listener) {
|
| + public static void warmUpCompiler(CachingArtifactProvider rootProvider,
|
| + DartCompilerListener listener) {
|
| EditorLibraryManager sysLibMgr = SystemLibraryManagerProvider.getSystemLibraryManager();
|
|
|
| String warmupSrcCode = "main() {print('success');}";
|
| @@ -207,7 +210,7 @@
|
|
|
| try {
|
| CompilerConfiguration config = new DefaultCompilerConfiguration(options, sysLibMgr) {
|
| - @Override
|
| + @Override
|
| public CompilerMetrics getCompilerMetrics() {
|
| return metrics;
|
| }
|
|
|