Minor, add missing space to error message

This commit is contained in:
Alexander Udalov
2015-04-20 17:29:54 +03:00
parent 02f05a1d9a
commit 2a3f658ea7
2 changed files with 24 additions and 25 deletions
@@ -1,2 +1,2 @@
ERROR: Path 'not/existing/path'does not exist ERROR: Path 'not/existing/path' does not exist
COMPILATION_ERROR COMPILATION_ERROR
@@ -68,12 +68,12 @@ public class LibrarySourcesConfig extends Config {
@NotNull String moduleId, @NotNull String moduleId,
@NotNull List<String> files, @NotNull List<String> files,
@NotNull EcmaVersion ecmaVersion, @NotNull EcmaVersion ecmaVersion,
boolean sourcemap, boolean sourceMap,
boolean inlineEnabled, boolean inlineEnabled,
boolean isUnitTestConfig, boolean isUnitTestConfig,
@Nullable String metaFileOutputPath @Nullable String metaFileOutputPath
) { ) {
super(project, moduleId, ecmaVersion, sourcemap, inlineEnabled, metaFileOutputPath); super(project, moduleId, ecmaVersion, sourceMap, inlineEnabled, metaFileOutputPath);
this.files = files; this.files = files;
this.isUnitTestConfig = isUnitTestConfig; this.isUnitTestConfig = isUnitTestConfig;
} }
@@ -140,7 +140,7 @@ public class LibrarySourcesConfig extends Config {
File filePath = new File(path); File filePath = new File(path);
if (!filePath.exists()) { if (!filePath.exists()) {
report.invoke("Path '" + path + "'does not exist"); report.invoke("Path '" + path + "' does not exist");
return true; return true;
} }
@@ -152,26 +152,25 @@ public class LibrarySourcesConfig extends Config {
} }
if (file == null) { 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; return true;
} }
String moduleName;
if (isOldKotlinJavascriptLibrary(filePath)) {
moduleName = LibraryUtils.getKotlinJsModuleName(filePath);
}
else if (isKotlinJavascriptLibraryWithMetadata(filePath)) {
moduleName = null;
}
else { else {
String moduleName; report.invoke("'" + path + "' is not a valid Kotlin Javascript library");
return true;
}
if (isOldKotlinJavascriptLibrary(filePath)) { if (action != null) {
moduleName = LibraryUtils.getKotlinJsModuleName(filePath); action.invoke(moduleName, file);
}
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);
}
} }
} }
@@ -184,7 +183,7 @@ public class LibrarySourcesConfig extends Config {
List<String> files; List<String> files;
@NotNull @NotNull
EcmaVersion ecmaVersion = EcmaVersion.defaultVersion(); EcmaVersion ecmaVersion = EcmaVersion.defaultVersion();
boolean sourcemap = false; boolean sourceMap = false;
boolean inlineEnabled = true; boolean inlineEnabled = true;
boolean isUnitTestConfig = false; boolean isUnitTestConfig = false;
String metaFileOutputPath; String metaFileOutputPath;
@@ -200,8 +199,8 @@ public class LibrarySourcesConfig extends Config {
return this; return this;
} }
public Builder sourceMap(boolean sourcemap) { public Builder sourceMap(boolean sourceMap) {
this.sourcemap = sourcemap; this.sourceMap = sourceMap;
return this; return this;
} }
@@ -221,7 +220,7 @@ public class LibrarySourcesConfig extends Config {
} }
public Config build() { 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);
} }
} }