Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static void readCertificates(String text, CertificateFactory factory, Co
}

private static byte[] decodeBase64(String content) {
byte[] bytes = content.replaceAll("\r", "").replaceAll("\n", "").getBytes();
byte[] bytes = content.replace("\r", "").replace("\n", "").getBytes();
return Base64.getDecoder().decode(bytes);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ PrivateKey parse(String text, String password) {
}

private static byte[] decodeBase64(String content) {
byte[] contentBytes = content.replaceAll("\r", "").replaceAll("\n", "").getBytes();
byte[] contentBytes = content.replace("\r", "").replace("\n", "").getBytes();
return Base64.getDecoder().decode(contentBytes);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ private Answer<ContainerReference> answerWithGeneratedContainerId() {
return (invocation) -> {
ContainerConfig config = invocation.getArgument(0, ContainerConfig.class);
ArrayNode command = getCommand(config);
String name = command.get(0).asText().substring(1).replaceAll("/", "-");
String name = command.get(0).asText().substring(1).replace('/', '-');
this.configs.put(name, config);
if (invocation.getArguments().length > 2) {
this.content.put(name, invocation.getArgument(2, ContainerContent.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public PemFileWriter() throws IOException {
Path writeFile(String name, String... contents) throws IOException {
Path path = Paths.get(this.tempDir.toString(), name);
for (String content : contents) {
Files.write(path, content.replaceAll(EXAMPLE_SECRET_QUALIFIER, "").getBytes(), StandardOpenOption.CREATE,
Files.write(path, content.replace(EXAMPLE_SECRET_QUALIFIER, "").getBytes(), StandardOpenOption.CREATE,
StandardOpenOption.APPEND);
}
return path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private static void readCertificates(String text, CertificateFactory factory, Co
}

private static byte[] decodeBase64(String content) {
byte[] bytes = content.replaceAll("\r", "").replaceAll("\n", "").getBytes();
byte[] bytes = content.replace("\r", "").replace("\n", "").getBytes();
return Base64.getDecoder().decode(bytes);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ PrivateKey parse(String text, String password) {
}

private static byte[] decodeBase64(String content) {
byte[] contentBytes = content.replaceAll("\r", "").replaceAll("\n", "").getBytes();
byte[] contentBytes = content.replace("\r", "").replace("\n", "").getBytes();
return Base64.getDecoder().decode(contentBytes);
}

Expand Down