From 2a3f658ea78b7b60cae9ea6ee03e0715a04a5d69 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 20 Apr 2015 17:29:54 +0300 Subject: [PATCH] Minor, add missing space to error message --- .../testData/cli/js/libraryDirNotFound.out | 4 +- .../js/config/LibrarySourcesConfig.java | 45 +++++++++---------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/compiler/testData/cli/js/libraryDirNotFound.out b/compiler/testData/cli/js/libraryDirNotFound.out index 3edf354d04a..35e96ef82e2 100644 --- a/compiler/testData/cli/js/libraryDirNotFound.out +++ b/compiler/testData/cli/js/libraryDirNotFound.out @@ -1,2 +1,2 @@ -ERROR: Path 'not/existing/path'does not exist -COMPILATION_ERROR \ No newline at end of file +ERROR: Path 'not/existing/path' does not exist +COMPILATION_ERROR diff --git a/js/js.frontend/src/org/jetbrains/kotlin/js/config/LibrarySourcesConfig.java b/js/js.frontend/src/org/jetbrains/kotlin/js/config/LibrarySourcesConfig.java index 563cc90e73f..17b800d67de 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/js/config/LibrarySourcesConfig.java +++ b/js/js.frontend/src/org/jetbrains/kotlin/js/config/LibrarySourcesConfig.java @@ -68,12 +68,12 @@ public class LibrarySourcesConfig extends Config { @NotNull String moduleId, @NotNull List files, @NotNull EcmaVersion ecmaVersion, - boolean sourcemap, + boolean sourceMap, boolean inlineEnabled, boolean isUnitTestConfig, @Nullable String metaFileOutputPath ) { - super(project, moduleId, ecmaVersion, sourcemap, inlineEnabled, metaFileOutputPath); + super(project, moduleId, ecmaVersion, sourceMap, inlineEnabled, metaFileOutputPath); this.files = files; this.isUnitTestConfig = isUnitTestConfig; } @@ -140,7 +140,7 @@ public class LibrarySourcesConfig extends Config { File filePath = new File(path); if (!filePath.exists()) { - report.invoke("Path '" + path + "'does not exist"); + report.invoke("Path '" + path + "' does not exist"); return true; } @@ -152,26 +152,25 @@ public class LibrarySourcesConfig extends Config { } if (file == null) { - report.invoke("File '" + path + "'does not exist or could not be read"); + report.invoke("File '" + path + "' does not exist or could not be read"); return true; } + + String moduleName; + + if (isOldKotlinJavascriptLibrary(filePath)) { + moduleName = LibraryUtils.getKotlinJsModuleName(filePath); + } + else if (isKotlinJavascriptLibraryWithMetadata(filePath)) { + moduleName = null; + } else { - String moduleName; + report.invoke("'" + path + "' is not a valid Kotlin Javascript library"); + return true; + } - if (isOldKotlinJavascriptLibrary(filePath)) { - moduleName = LibraryUtils.getKotlinJsModuleName(filePath); - } - else if (isKotlinJavascriptLibraryWithMetadata(filePath)) { - moduleName = null; - } - else { - report.invoke("'" + path + "' is not a valid Kotlin Javascript library"); - return true; - } - - if (action != null) { - action.invoke(moduleName, file); - } + if (action != null) { + action.invoke(moduleName, file); } } @@ -184,7 +183,7 @@ public class LibrarySourcesConfig extends Config { List files; @NotNull EcmaVersion ecmaVersion = EcmaVersion.defaultVersion(); - boolean sourcemap = false; + boolean sourceMap = false; boolean inlineEnabled = true; boolean isUnitTestConfig = false; String metaFileOutputPath; @@ -200,8 +199,8 @@ public class LibrarySourcesConfig extends Config { return this; } - public Builder sourceMap(boolean sourcemap) { - this.sourcemap = sourcemap; + public Builder sourceMap(boolean sourceMap) { + this.sourceMap = sourceMap; return this; } @@ -221,7 +220,7 @@ public class LibrarySourcesConfig extends Config { } public Config build() { - return new LibrarySourcesConfig(project, moduleId, files, ecmaVersion, sourcemap, inlineEnabled, isUnitTestConfig, metaFileOutputPath); + return new LibrarySourcesConfig(project, moduleId, files, ecmaVersion, sourceMap, inlineEnabled, isUnitTestConfig, metaFileOutputPath); } }