You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by md...@apache.org on 2020/12/01 00:59:34 UTC
[lucene-solr] branch branch_8x updated: SOLR-15009 Use older Path
APIs
This is an automated email from the ASF dual-hosted git repository.
mdrob pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new bd4deb2 SOLR-15009 Use older Path APIs
bd4deb2 is described below
commit bd4deb2c90be9a2f9568155efc9344b9f1db4fe4
Author: Mike Drob <md...@apple.com>
AuthorDate: Mon Nov 30 16:48:49 2020 -0800
SOLR-15009 Use older Path APIs
---
solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java b/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
index c76389b..71947a2 100644
--- a/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
+++ b/solr/core/src/java/org/apache/solr/core/CachingDirectoryFactory.java
@@ -19,6 +19,7 @@ package org.apache.solr.core;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.nio.file.DirectoryStream;
+import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -326,7 +327,7 @@ public abstract class CachingDirectoryFactory extends DirectoryFactory {
@Override
public boolean exists(String path) throws IOException {
// we go by the persistent storage ...
- Path dirPath = Path.of(path);
+ Path dirPath = FileSystems.getDefault().getPath(path);
if (Files.isReadable(dirPath)) {
try (DirectoryStream<Path> directory = Files.newDirectoryStream(dirPath)) {
return directory.iterator().hasNext();