File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
spring-boot-project/spring-boot/src
main/java/org/springframework/boot/ssl/pem
test/java/org/springframework/boot/ssl/pem Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 2525import java .nio .file .StandardOpenOption ;
2626import java .security .PrivateKey ;
2727import java .security .cert .X509Certificate ;
28- import java .util .Arrays ;
2928import java .util .List ;
3029import java .util .Objects ;
3130import java .util .regex .Pattern ;
3534import org .springframework .core .io .Resource ;
3635import org .springframework .util .Assert ;
3736import org .springframework .util .StreamUtils ;
38- import org .springframework .util .StringUtils ;
3937
4038/**
4139 * PEM encoded content that can provide {@link X509Certificate certificates} and
@@ -54,9 +52,7 @@ public final class PemContent {
5452 private final String text ;
5553
5654 private PemContent (String text ) {
57- this .text = Arrays .stream (StringUtils .delimitedListToStringArray (text , "\n " ))
58- .map (String ::trim )
59- .collect (Collectors .joining ("\n " ));
55+ this .text = text .lines ().map (String ::trim ).collect (Collectors .joining ("\n " ));
6056 }
6157
6258 /**
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ void ofReturnsContent() {
211211 }
212212
213213 private static String contentFromClasspath (String path ) throws IOException {
214- return new ClassPathResource (path ).getContentAsString (StandardCharsets .UTF_8 );
214+ return new ClassPathResource (path ).getContentAsString (StandardCharsets .UTF_8 ). indent ( 0 ). stripTrailing () ;
215215 }
216216
217217}
You can’t perform that action at this time.
0 commit comments