mirror of
https://github.com/songoda/SongodaCore.git
synced 2024-11-27 04:25:19 +01:00
Makes SongodaYamlConfig#cannotCreateBackupCopyExceptionPrefix static
It already is `final`. By making it static we reduce the memory required by each instance of the class.
This commit is contained in:
parent
bba5fa5f3e
commit
8e91cc18eb
@ -31,7 +31,7 @@ import java.util.logging.Logger;
|
||||
// TODO: Allow registering load-Listeners
|
||||
// TODO: Provide method to only save if changed
|
||||
public class SongodaYamlConfig extends YamlConfiguration {
|
||||
protected final String cannotCreateBackupCopyExceptionPrefix = "Unable to create backup copy of config file: ";
|
||||
protected static final String cannotCreateBackupCopyExceptionPrefix = "Unable to create backup copy of config file: ";
|
||||
|
||||
public final @NotNull File file;
|
||||
protected final @NotNull Logger logger;
|
||||
@ -239,7 +239,7 @@ public class SongodaYamlConfig extends YamlConfiguration {
|
||||
|
||||
this.logger.info("Created backup copy of config file '" + this.file.getPath() + "' to '" + targetPath + "'");
|
||||
} catch (IOException ex) {
|
||||
throw new IOException(this.cannotCreateBackupCopyExceptionPrefix + this.file.getPath(), ex);
|
||||
throw new IOException(cannotCreateBackupCopyExceptionPrefix + this.file.getPath(), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user