Skip to content
This repository was archived by the owner on Jun 7, 2022. It is now read-only.

Commit 0793923

Browse files
authored
Rename some variables
1 parent 67dc702 commit 0793923

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

cloudnet-core/src/main/java/de/dytanic/cloudnetcore/wrapper/local/LocalCloudWrapper.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public Configuration loadWrapperConfiguration() {
6868
if (this.config == null || this.config.isOutdated()) {
6969
try (InputStream inputStream = Files.newInputStream(Paths.get("wrapper/config.yml"))) {
7070
this.config = new LocalWrapperConfig(ConfigurationProvider.getProvider(YamlConfiguration.class).load(inputStream));
71-
} catch (IOException e) {
72-
e.printStackTrace();
71+
} catch (IOException exception) {
72+
exception.printStackTrace();
7373
}
7474
}
7575
return this.config != null ? this.config.getConfiguration() : null;
@@ -84,16 +84,16 @@ public void installUpdate(WebClient webClient) {
8484
try {
8585
this.stop();
8686
runningBeforeUpdate = true;
87-
} catch (IOException e) {
88-
e.printStackTrace();
87+
} catch (IOException exception) {
88+
exception.printStackTrace();
8989
}
9090
}
9191
webClient.updateLocalCloudWrapper(path);
9292
if (runningBeforeUpdate) {
9393
try {
9494
this.startProcess();
95-
} catch (IOException e) {
96-
e.printStackTrace();
95+
} catch (IOException exception) {
96+
exception.printStackTrace();
9797
}
9898
}
9999
}
@@ -112,8 +112,8 @@ public void run(OptionSet obj) {
112112
this.setupWrapperKey();
113113
this.setupSpigot(obj);
114114

115-
} catch (IOException e) {
116-
e.printStackTrace();
115+
} catch (IOException exception) {
116+
exception.printStackTrace();
117117
}
118118

119119
this.startup();
@@ -134,8 +134,8 @@ private void setupWrapperJar() {
134134
urlConnection.connect();
135135
Files.copy(urlConnection.getInputStream(), path);
136136
System.out.println("Download completed!");
137-
} catch (Exception ex) {
138-
System.err.println("Error on setting up wrapper: " + ex.getMessage());
137+
} catch (Exception exception) {
138+
System.err.println("Error on setting up wrapper: " + exception.getMessage());
139139
return;
140140
}
141141
}
@@ -196,17 +196,17 @@ private void setupConfig() {
196196

197197
try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter(Files.newOutputStream(path), StandardCharsets.UTF_8)) {
198198
ConfigurationProvider.getProvider(YamlConfiguration.class).save(configuration, outputStreamWriter);
199-
} catch (IOException e) {
200-
e.printStackTrace();
199+
} catch (IOException exception) {
200+
exception.printStackTrace();
201201
}
202202
}
203203
}
204204

205205
private void setupWrapperKey() {
206206
try {
207207
Files.copy(Paths.get("WRAPPER_KEY.cnd"), Paths.get("wrapper/WRAPPER_KEY.cnd"), StandardCopyOption.REPLACE_EXISTING);
208-
} catch (IOException e) {
209-
e.printStackTrace();
208+
} catch (IOException exception) {
209+
exception.printStackTrace();
210210
}
211211
}
212212

@@ -215,8 +215,8 @@ private void setupSpigot(OptionSet obj) {
215215
if (!obj.has("disallow_bukkit_download") && !Files.exists(path)) {
216216
try {
217217
Files.createDirectories(path.getParent());
218-
} catch (IOException e) {
219-
e.printStackTrace();
218+
} catch (IOException exception) {
219+
exception.printStackTrace();
220220
}
221221
SetupSpigotVersion setup = new SetupSpigotVersion();
222222
setup.setTarget(path);
@@ -234,9 +234,9 @@ private void startup() {
234234
this.startProcess();
235235

236236
System.out.println("Successfully started the local wrapper!");
237-
} catch (IOException e) {
237+
} catch (IOException exception) {
238238
System.err.println("Failed to start the local wrapper!");
239-
e.printStackTrace();
239+
exception.printStackTrace();
240240
}
241241
}
242242

@@ -255,9 +255,9 @@ private void startProcess() throws IOException {
255255
private void initConsoleThread() {
256256
this.executorService.execute(() -> {
257257
InputStream inputStream = this.process.getInputStream();
258-
this.readStream(inputStream, s -> {
258+
this.readStream(inputStream, line -> {
259259
if (this.showConsoleOutput) {
260-
System.out.println("LocalWrapper | " + s);
260+
System.out.println("LocalWrapper | " + line);
261261
}
262262
});
263263
if (!this.shutdown) {
@@ -272,9 +272,9 @@ private void initConsoleThread() {
272272
});
273273
this.executorService.execute(() -> {
274274
InputStream inputStream = this.process.getErrorStream();
275-
this.readStream(inputStream, s -> {
275+
this.readStream(inputStream, line -> {
276276
if (this.showConsoleOutput) {
277-
System.err.println("LocalWrapper | " + s);
277+
System.err.println("LocalWrapper | " + line);
278278
}
279279
});
280280
});
@@ -288,8 +288,8 @@ private void readStream(InputStream inputStream, Consumer<String> consumer) {
288288
consumer.accept(line);
289289
}
290290
}
291-
} catch (IOException e) {
292-
e.printStackTrace();
291+
} catch (IOException exception) {
292+
exception.printStackTrace();
293293
}
294294
}
295295

@@ -310,8 +310,8 @@ private void stop() throws IOException {
310310
this.process.destroy();
311311
}
312312
System.out.println("Successfully stopped the local wrapper!");
313-
} catch (InterruptedException e) {
314-
e.printStackTrace();
313+
} catch (InterruptedException exception) {
314+
exception.printStackTrace();
315315
}
316316
}
317317

0 commit comments

Comments
 (0)