Skip to content

Commit

Permalink
Resolves mojohaus#850: Protecting the display-plugin-updates mojo aga…
Browse files Browse the repository at this point in the history
…inst a NPE in case the effective version of a plugin is not specified
  • Loading branch information
andrzejj0 committed Dec 18, 2022
1 parent a487771 commit 901178d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
Expand All @@ -52,6 +53,8 @@
import org.apache.maven.model.BuildBase;
import org.apache.maven.model.Model;
import org.apache.maven.model.Plugin;
import org.apache.maven.model.PluginConfiguration;
import org.apache.maven.model.PluginManagement;
import org.apache.maven.model.Prerequisites;
import org.apache.maven.model.Profile;
import org.apache.maven.model.ReportPlugin;
Expand Down Expand Up @@ -620,7 +623,7 @@ private static String pad(String start, int len, String... ends) {
buf.append(start);
int padding = len;
for (String end : ends) {
padding -= end.length();
padding -= String.valueOf(end).length();
}
buf.append(' ');
while (buf.length() < padding) {
Expand Down

0 comments on commit 901178d

Please sign in to comment.