sashapolo commented on code in PR #6209:
URL: https://github.com/apache/ignite-3/pull/6209#discussion_r2191711894


##########
modules/runner/src/main/java/org/apache/ignite/internal/configuration/storage/LocalFileConfigurationStorage.java:
##########
@@ -353,18 +360,25 @@ private static String renderConfig(ConfigObject conf) {
 
     /** Check that configuration file still exists and restore it with latest 
applied state in case it was deleted. */
     private void checkAndRestoreConfigFile() {
-        if (!configPath.toFile().exists()) {
+        if (Files.notExists(configPath)) {
             try {
-                if (configPath.toFile().createNewFile()) {
-                    if (!latest.isEmpty()) {
-                        saveConfigFile();
-                    }
-                } else {
-                    throw new NodeConfigCreateException("Failed to re-create 
config file");
+                Files.createFile(configPath);
+
+                if (!latest.isEmpty()) {
+                    saveConfigFile();
                 }
+            } catch (FileAlreadyExistsException e){
+                throw new NodeConfigCreateException("Failed to re-create 
config file");

Review Comment:
   ```suggestion
                   throw new NodeConfigCreateException("Failed to re-create 
config file.");
   ```



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to