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 25
25
import java .nio .file .StandardOpenOption ;
26
26
import java .security .PrivateKey ;
27
27
import java .security .cert .X509Certificate ;
28
- import java .util .Arrays ;
29
28
import java .util .List ;
30
29
import java .util .Objects ;
31
30
import java .util .regex .Pattern ;
35
34
import org .springframework .core .io .Resource ;
36
35
import org .springframework .util .Assert ;
37
36
import org .springframework .util .StreamUtils ;
38
- import org .springframework .util .StringUtils ;
39
37
40
38
/**
41
39
* PEM encoded content that can provide {@link X509Certificate certificates} and
@@ -54,9 +52,7 @@ public final class PemContent {
54
52
private final String text ;
55
53
56
54
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 " ));
60
56
}
61
57
62
58
/**
Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ void ofReturnsContent() {
211
211
}
212
212
213
213
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 () ;
215
215
}
216
216
217
217
}
You can’t perform that action at this time.
0 commit comments