This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new d97183fddc0 Fix sonar issue on ClasspathResourceDirectoryReader
(#31880)
d97183fddc0 is described below
commit d97183fddc0bd1976690378e2733938eb4abcc8a
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Jun 27 08:37:46 2024 +0800
Fix sonar issue on ClasspathResourceDirectoryReader (#31880)
* Refactor ColumnValueReaderEngine
* Fix sonar issue on ClasspathResourceDirectoryReader
---
.../infra/util/directory/ClasspathResourceDirectoryReader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReader.java
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReader.java
index ff7aa03e200..e9c65f063f0 100644
---
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReader.java
+++
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/directory/ClasspathResourceDirectoryReader.java
@@ -86,7 +86,7 @@ public final class ClasspathResourceDirectoryReader {
}
return jarFile.getJarEntry(name).isDirectory();
} else {
- return Files.isDirectory(Paths.get(resourceUrl.toURI()));
+ return Paths.get(resourceUrl.toURI()).toFile().exists();
}
}