MieAh commented on code in PR #11361:
URL: https://github.com/apache/dubbo/pull/11361#discussion_r1096488465
##########
dubbo-common/src/main/java/org/apache/dubbo/common/cache/FileCacheStoreFactory.java:
##########
@@ -149,12 +159,20 @@ private static FileCacheStore getFile(String name,
boolean enableFileCache) {
FileCacheStore.Builder builder = FileCacheStore.newBuilder();
tryFileLock(builder, name);
File file = new File(name);
-
if (!file.exists()) {
Path pathObjectOfFile = file.toPath();
Files.createFile(pathObjectOfFile);
}
+ // Save
+ if (!file.exists()) {
+ file.createNewFile();
+ }
Review Comment:
The judgment logic for whether the file exists here can be put together.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]