Skip to content

Commit

Permalink
Calling toArray on an array of a possibly different (post-hook) size …
Browse files Browse the repository at this point in the history
…could lead to null elements!
  • Loading branch information
jglick committed Sep 25, 2019
1 parent 0e343ec commit c3bcaa8
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,10 @@ private TestExecutionResult testPluginAgainst(MavenCoordinates coreCoordinates,
forExecutionHooks.put("config", config);
forExecutionHooks.put("pluginDir", pluginCheckoutDir);
pcth.runBeforeExecution(forExecutionHooks);
args = (List<String>)forExecutionHooks.get("args");

// Execute with tests
runner.run(mconfig, pluginCheckoutDir, buildLogFile, ((List<String>)forExecutionHooks.get("args")).toArray(new String[args.size()]));
runner.run(mconfig, pluginCheckoutDir, buildLogFile, args.toArray(new String[args.size()]));

return new TestExecutionResult(((PomData)forExecutionHooks.get("pomData")).getWarningMessages());
}catch(PomExecutionException e){
Expand Down

0 comments on commit c3bcaa8

Please sign in to comment.