3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 19:10:07 +01:00

use try-with-resources

Dieser Commit ist enthalten in:
ㄗㄠˋ ㄑㄧˊ 2020-03-11 13:34:11 +08:00 committet von GitHub
Ursprung bd692917e6
Commit 39e1026400
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -439,9 +439,10 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
File actual = new File(getDataFolder(), name);
if (!actual.exists()) {
try {
InputStream stream = getResource("defaults/" + name);
if (stream == null) throw new FileNotFoundException();
copyDefaultConfig(stream, actual, name);
try (InputStream stream = getResource("defaults/" + name)) {
if (stream == null) throw new FileNotFoundException();
copyDefaultConfig(stream, actual, name);
}
} catch (IOException e) {
getLogger().severe("Unable to read default configuration: " + name);
}