From 97a51ddcaa6eb3e882cb727a4c8036dce47a18ed Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Thu, 18 Jan 2018 23:58:17 +0900 Subject: [PATCH] Use the platform-specific line separator See gh-11674 --- .../DuplicateJsonObjectContextCustomizerFactory.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java b/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java index b6abcdc20d1..64adf739548 100644 --- a/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java +++ b/spring-boot-test/src/main/java/org/springframework/boot/test/json/DuplicateJsonObjectContextCustomizerFactory.java @@ -75,13 +75,13 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa } private void logDuplicateJsonObjectsWarning(List jsonObjects) { - StringBuilder message = new StringBuilder("\n\nFound multiple occurrences of" - + " org.json.JSONObject on the class path:\n\n"); + StringBuilder message = new StringBuilder(String.format("%n%nFound multiple occurrences of" + + " org.json.JSONObject on the class path:%n%n")); for (URL jsonObject : jsonObjects) { - message.append("\t" + jsonObject + "\n"); + message.append(String.format("\t%s%n", jsonObject)); } - message.append("\nYou may wish to exclude one of them to ensure" - + " predictable runtime behaviour\n"); + message.append(String.format("%nYou may wish to exclude one of them to ensure" + + " predictable runtime behavior%n")); this.logger.warn(message); }