Skip to content

Commit ce7ac5b

Browse files
committed
pr comment
1 parent 1f385ab commit ce7ac5b

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/api/ElasticsearchEntitlementChecker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import java.nio.file.CopyOption;
6262
import java.nio.file.DirectoryStream;
6363
import java.nio.file.FileStore;
64+
import java.nio.file.Files;
6465
import java.nio.file.LinkOption;
6566
import java.nio.file.OpenOption;
6667
import java.nio.file.Path;
@@ -1383,8 +1384,7 @@ public void checkPathToRealPath(Class<?> callerClass, Path that, LinkOption... o
13831384
}
13841385
if (followLinks) {
13851386
try {
1386-
FileSystemProvider provider = that.getFileSystem().provider();
1387-
policyManager.checkFileRead(callerClass, provider.readSymbolicLink(that));
1387+
policyManager.checkFileRead(callerClass, Files.readSymbolicLink(that));
13881388
} catch (IOException | UnsupportedOperationException e) {
13891389
// that is not a link, or unrelated IOException or unsupported
13901390
}

0 commit comments

Comments
 (0)