Skip to content

Commit 9872e2e

Browse files
author
Nithin Tatikonda
committed
fixed null pointer exception in mojo
1 parent bace240 commit 9872e2e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

maven/src/main/java/org/openapitools/openapidiff/maven/OpenApiDiffMojo.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.openapitools.openapidiff.maven;
22

3+
import java.io.File;
4+
import java.io.FileWriter;
5+
import java.io.IOException;
36
import org.apache.maven.plugin.AbstractMojo;
47
import org.apache.maven.plugin.MojoExecutionException;
58
import org.apache.maven.plugin.MojoFailureException;
@@ -11,10 +14,6 @@
1114
import org.openapitools.openapidiff.core.output.ConsoleRender;
1215
import org.openapitools.openapidiff.core.output.HtmlRender;
1316

14-
import java.io.File;
15-
import java.io.FileWriter;
16-
import java.io.IOException;
17-
1817
/** A Maven Mojo that diffs two OpenAPI specifications and reports on differences. */
1918
@Mojo(name = "diff", defaultPhase = LifecyclePhase.TEST)
2019
public class OpenApiDiffMojo extends AbstractMojo {
@@ -31,10 +30,10 @@ public class OpenApiDiffMojo extends AbstractMojo {
3130
Boolean failOnChanged = false;
3231

3332
@Parameter(property = "outputType")
34-
String outputType;
33+
String outputType = "";
3534

3635
@Parameter(property = "outputFile")
37-
String outputFile;
36+
String outputFile = "";
3837

3938
@Parameter(property = "skip", defaultValue = "false")
4039
Boolean skip = false;

0 commit comments

Comments
 (0)