Skip to content

Commit

Permalink
Fix importOrder with trailing spaces for plugin-maven (fixes #731)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedtwigg committed Nov 12, 2020
1 parent 957c2ba commit 59e6983
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public FormatterStep newFormatterStep(FormatterStepConfig config) {
File importsFile = config.getFileLocator().locateFile(file);
return ImportOrderStep.forGroovy().createFrom(importsFile);
} else {
return ImportOrderStep.forGroovy().createFrom(order.split(","));
return ImportOrderStep.forGroovy().createFrom(order.split(",", -1));
}
} else if (file == null && order == null) {
return ImportOrderStep.forGroovy().createFrom();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public FormatterStep newFormatterStep(FormatterStepConfig config) {
File importsFile = config.getFileLocator().locateFile(file);
return ImportOrderStep.forJava().createFrom(importsFile);
} else {
return ImportOrderStep.forJava().createFrom(order.split(","));
return ImportOrderStep.forJava().createFrom(order.split(",", -1));
}
} else if (file == null && order == null) {
return ImportOrderStep.forJava().createFrom();
Expand Down

0 comments on commit 59e6983

Please sign in to comment.