Skip to content

Commit

Permalink
changed replaceAll with replace
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrouR committed Oct 5, 2019
1 parent 35e0e87 commit dbef99b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class InteractiveImporterTest {
private static final String FORMATTED_SOLIDITY_PATH =
"/web3j/console/src/test/resources/Solidity".replaceAll("/", File.separator);
"/web3j/console/src/test/resources/Solidity".replace("/", File.separator);
private InputStream inputStream;
private String tempDirPath;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void testWithPicoCliWhenArgumentsAreEmpty() {
public void testWhenInteractiveAndArgumentsAreCorrect()
throws IOException, InterruptedException {
String formattedPath =
"/web3j/console/src/test/resources/Solidity".replaceAll("/", File.separator);
"/web3j/console/src/test/resources/Solidity".replace("/", File.separator);
final String[] args = {"import"};
Process process =
executeClassAsSubProcessAndReturnProcess(
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/web3j/console/project/ProjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public void setUpProject(@TempDir Path tempDirPath) throws Exception {
.loadGradlewWrapperSettings("gradlew-wrapper.properties.template")
.loadGradleJar("gradle-wrapper.jar")
.loadSolidityGreeter("Greeter.sol")
.withPackageNameReplacement(s -> s.replaceAll("<package_name>", "test"))
.withProjectNameReplacement(s -> s.replaceAll("<project_name>", "test"))
.withPackageNameReplacement(s -> s.replace("<package_name>", "test"))
.withProjectNameReplacement(s -> s.replace("<project_name>", "test"))
.build();
Project.builder()
.withTemplateProvider(templateProviderNew)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public void init() throws IOException {
.loadGradleSettings("settings.gradle.template")
.loadGradlewWrapperSettings("gradlew-wrapper.properties.template")
.loadGradleJar("gradle-wrapper.jar")
.withPackageNameReplacement(s -> s.replaceAll("<package_name>", "test"))
.withProjectNameReplacement(s -> s.replaceAll("<project_name>", "test"))
.withPackageNameReplacement(s -> s.replace("<package_name>", "test"))
.withProjectNameReplacement(s -> s.replace("<project_name>", "test"))
.build();
}

Expand Down

0 comments on commit dbef99b

Please sign in to comment.