Improved concatenation way in PropertiesStorage.java (#7486)

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
This commit is contained in:
maheshnikam 2023-11-16 16:07:53 +05:30 committed by GitHub
parent 267a457efc
commit cc45bffdbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,11 +92,14 @@ public class PropertiesStorage implements StorageComponent {
file = new File(path); file = new File(path);
try { try {
if (!file.createNewFile()) { if (!file.createNewFile()) {
s_logger.error("Unable to create _file: " + file.getAbsolutePath()); s_logger.error(String.format("Unable to create _file: %s", file.getAbsolutePath()));
return false; return false;
} }
} catch (IOException e) { } catch (IOException e) {
s_logger.error("Unable to create _file: " + file.getAbsolutePath(), e); s_logger.error(String.format("Unable to create file: %s", file.getAbsolutePath()));
if (s_logger.isDebugEnabled()) {
s_logger.debug(String.format("IOException while trying to create file: %s", file.getAbsolutePath()), e);
}
return false; return false;
} }
} }