Skip to content

Commit

Permalink
sbt-dotty: fix "sbt doc" after the Java rewrite
Browse files Browse the repository at this point in the history
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
  • Loading branch information
smarter committed Jan 27, 2019
1 parent dbc7801 commit 18b3de8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sbt-bridge/src/xsbt/DottydocRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void run() {
}
return msg.toString();
});
args = retained.toArray(args0);
args = retained.toArray(new String[retained.size()]);
} else {
args = args0;
}
Expand Down

0 comments on commit 18b3de8

Please sign in to comment.