diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java index 37246f26e8..d605002e9c 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeDependencies.java @@ -142,7 +142,7 @@ public abstract class UpgradeDependencies extends DefaultTask { if (new ProcessBuilder().command("git", "commit", "-m", commitMessage).start().waitFor() != 0) { throw new IllegalStateException("git commit failed"); } - System.out.println(" Commit: " + commitMessage.substring(commitMessage.indexOf('\n'))); + System.out.println(" Commit: " + commitMessage.substring(0, commitMessage.indexOf('\n'))); } catch (IOException ex) { throw new TaskExecutionException(this, ex);