Skip to content

Commit 019290d

Browse files
rohanKanojiamanusa
authored andcommitted
Use replace with File.sepratorChar instead of calculating it
1 parent 85e8d4f commit 019290d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

uberjar/src/test/java/io/fabric8/kubernetes/clnt/UberJarTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ private String getMinorVersion(String projectVersion) {
159159
}
160160

161161
private File getFileInDirectory(File parentFile, String pathToFile) {
162-
String toReplaceChar = File.separator.equals("/") ? File.separator : "\\\\";
163-
pathToFile = pathToFile.replaceAll("/", toReplaceChar);
162+
pathToFile = pathToFile.replace('/', File.separatorChar);
164163
return new File(parentFile, pathToFile);
165164
}
166165

0 commit comments

Comments
 (0)