Skip to content

Commit 08908fd

Browse files
committed
sbt-dotty: fix "sbt doc" after the Java rewrite
If args0 is bigger than retained, `retained.toArray(args0)` will fill args0 with the elements of retained and fill the rest with `null`, leading to an NPE later on. This was caught by the sbt scripted tests and can be reproduced by running: sbt-dotty/scripted sbt-dotty/example-project
1 parent 0e513ed commit 08908fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/xsbt/DottydocRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void run() {
6767
}
6868
return msg.toString();
6969
});
70-
args = retained.toArray(args0);
70+
args = retained.toArray(new String[retained.size()]);
7171
} else {
7272
args = args0;
7373
}

0 commit comments

Comments
 (0)