From 34b31f1abccb7ca79c54590a29cc33d44dafffee Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Fri, 11 Dec 2015 17:40:28 +0000 Subject: [PATCH] Protect against null description Update `removeLineBreaks` to also work with `null`. See gh-4703 --- .../main/java/org/springframework/boot/maven/RepackageMojo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index a74f4288b6..83bce72bff 100644 --- a/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -268,7 +268,7 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { } private String removeLineBreaks(String description) { - return description.replaceAll("\\s+", " "); + return (description == null ? null : description.replaceAll("\\s+", " ")); } private void putIfMissing(Properties properties, String key,