Skip to content

Commit 8600288

Browse files
committed
Whoops, nio
1 parent 156c1ed commit 8600288

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libs/entitlement/src/main/java/org/elasticsearch/entitlement/runtime/policy/FileAccessTree.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
import org.elasticsearch.entitlement.runtime.policy.entitlements.FileEntitlement;
1313

14-
import java.io.File;
1514
import java.nio.file.Path;
15+
import java.nio.file.Paths;
1616
import java.util.ArrayList;
1717
import java.util.Arrays;
1818
import java.util.List;
@@ -55,7 +55,7 @@ boolean canWrite(Path path) {
5555
}
5656

5757
private static String normalizedPath(FileEntitlement fileEntitlement) {
58-
return normalize(new File(fileEntitlement.path()).toPath());
58+
return normalize(Paths.get(fileEntitlement.path()));
5959
}
6060

6161
private static String normalize(Path path) {

0 commit comments

Comments
 (0)