Skip to content

Commit e2d27d5

Browse files
authored
Tidy FileUtils.java
Signed-off-by: Ashley <73482956+ascopes@users.noreply.github.com>
1 parent 0770d58 commit e2d27d5

File tree

1 file changed

+2
-5
lines changed
  • java-compiler-testing/src/main/java/io/github/ascopes/jct/utils

1 file changed

+2
-5
lines changed

java-compiler-testing/src/main/java/io/github/ascopes/jct/utils/FileUtils.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public static String pathToBinaryName(Path path) {
146146
var names = new String[count];
147147

148148
for (var i = 0; i < count; ++i) {
149-
names[i] = FileUtils.stripFileExtension(path.getName(i).toString());
149+
names[i] = stripFileExtension(path.getName(i).toString());
150150
}
151151

152152
return String.join(".", names);
@@ -307,10 +307,7 @@ public static Predicate<? super Path> fileWithAnyKind(Set<? extends Kind> kinds)
307307
}
308308

309309
private static Path resolve(Path root, String... parts) {
310-
for (var part : parts) {
311-
root = root.resolve(part);
312-
}
313-
return root.normalize();
310+
return resolve(root, List.of(parts));
314311
}
315312

316313
private static Path resolve(Path root, Iterable<String> parts) {

0 commit comments

Comments
 (0)