Skip to content

Commit 05c4bc2

Browse files
committed
Fix array initialization exception
1 parent 9745035 commit 05c4bc2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

swan-cmd/src/main/java/de/fraunhofer/iem/swan/io/doc/DocletExecutor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import javax.tools.DocumentationTool;
44
import javax.tools.ToolProvider;
55
import java.util.ArrayList;
6-
import java.util.List;
6+
import java.util.Arrays;
77

88
/**
99
* @author Oshando Johnson on 03.06.20
@@ -35,7 +35,7 @@ public void setDoclet(String doclet) {
3535

3636
public void runDoclet(String sourcePath, String packages, String outputPath) {
3737

38-
ArrayList<String> docletArgs = new ArrayList<>(List.of(
38+
ArrayList<String> docletArgs = new ArrayList<>(Arrays.asList(
3939
"-doclet", doclet,
4040
"-docletpath", getDocletPath(doclet),
4141
"-sourcepath", sourcePath,
@@ -56,7 +56,7 @@ public void runDoclet(String sourcePath, String packages) {
5656
}
5757

5858
/**
59-
* Returns jar location for the the specified doclet.
59+
* Returns jar location for the specified doclet.
6060
*
6161
* @param doclet name of doclet
6262
* @return path to doclet jar
@@ -70,6 +70,6 @@ private String getDocletPath(String doclet) {
7070
case STANDARD_DOCLET:
7171
return "/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/lib/tools.jar";
7272
}
73-
return null;
73+
return "";
7474
}
7575
}

0 commit comments

Comments
 (0)