fixed possible NPE

This commit is contained in:
James Strachan
2012-05-31 09:32:03 +01:00
parent c4439f33f0
commit 2d4354af6c
@@ -84,7 +84,7 @@ public class K2JSCompilerMojo extends KotlinCompileMojo {
@Override @Override
public void execute() throws MojoExecutionException, MojoFailureException { public void execute() throws MojoExecutionException, MojoFailureException {
super.execute(); super.execute();
if (copyLibraryJS) { if (copyLibraryJS != null && copyLibraryJS.booleanValue()) {
getLog().info("Copying kotlin JS library to " + outputKotlinJSFile); getLog().info("Copying kotlin JS library to " + outputKotlinJSFile);
// lets copy the kotlin library into the output directory // lets copy the kotlin library into the output directory
@@ -107,7 +107,7 @@ public class K2JSCompilerMojo extends KotlinCompileMojo {
throw new MojoExecutionException(e.getMessage(), e); throw new MojoExecutionException(e.getMessage(), e);
} }
} }
if (appendLibraryJS) { if (appendLibraryJS != null && appendLibraryJS.booleanValue()) {
getLog().info("Appending Kotlin Library JS to the generated file " + outputFile); getLog().info("Appending Kotlin Library JS to the generated file " + outputFile);
// lets copy the kotlin library into the output directory // lets copy the kotlin library into the output directory