@@ -68,8 +68,8 @@ public Configuration loadWrapperConfiguration() {
68
68
if (this .config == null || this .config .isOutdated ()) {
69
69
try (InputStream inputStream = Files .newInputStream (Paths .get ("wrapper/config.yml" ))) {
70
70
this .config = new LocalWrapperConfig (ConfigurationProvider .getProvider (YamlConfiguration .class ).load (inputStream ));
71
- } catch (IOException e ) {
72
- e .printStackTrace ();
71
+ } catch (IOException exception ) {
72
+ exception .printStackTrace ();
73
73
}
74
74
}
75
75
return this .config != null ? this .config .getConfiguration () : null ;
@@ -84,16 +84,16 @@ public void installUpdate(WebClient webClient) {
84
84
try {
85
85
this .stop ();
86
86
runningBeforeUpdate = true ;
87
- } catch (IOException e ) {
88
- e .printStackTrace ();
87
+ } catch (IOException exception ) {
88
+ exception .printStackTrace ();
89
89
}
90
90
}
91
91
webClient .updateLocalCloudWrapper (path );
92
92
if (runningBeforeUpdate ) {
93
93
try {
94
94
this .startProcess ();
95
- } catch (IOException e ) {
96
- e .printStackTrace ();
95
+ } catch (IOException exception ) {
96
+ exception .printStackTrace ();
97
97
}
98
98
}
99
99
}
@@ -112,8 +112,8 @@ public void run(OptionSet obj) {
112
112
this .setupWrapperKey ();
113
113
this .setupSpigot (obj );
114
114
115
- } catch (IOException e ) {
116
- e .printStackTrace ();
115
+ } catch (IOException exception ) {
116
+ exception .printStackTrace ();
117
117
}
118
118
119
119
this .startup ();
@@ -134,8 +134,8 @@ private void setupWrapperJar() {
134
134
urlConnection .connect ();
135
135
Files .copy (urlConnection .getInputStream (), path );
136
136
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 ());
139
139
return ;
140
140
}
141
141
}
@@ -196,17 +196,17 @@ private void setupConfig() {
196
196
197
197
try (OutputStreamWriter outputStreamWriter = new OutputStreamWriter (Files .newOutputStream (path ), StandardCharsets .UTF_8 )) {
198
198
ConfigurationProvider .getProvider (YamlConfiguration .class ).save (configuration , outputStreamWriter );
199
- } catch (IOException e ) {
200
- e .printStackTrace ();
199
+ } catch (IOException exception ) {
200
+ exception .printStackTrace ();
201
201
}
202
202
}
203
203
}
204
204
205
205
private void setupWrapperKey () {
206
206
try {
207
207
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 ();
210
210
}
211
211
}
212
212
@@ -215,8 +215,8 @@ private void setupSpigot(OptionSet obj) {
215
215
if (!obj .has ("disallow_bukkit_download" ) && !Files .exists (path )) {
216
216
try {
217
217
Files .createDirectories (path .getParent ());
218
- } catch (IOException e ) {
219
- e .printStackTrace ();
218
+ } catch (IOException exception ) {
219
+ exception .printStackTrace ();
220
220
}
221
221
SetupSpigotVersion setup = new SetupSpigotVersion ();
222
222
setup .setTarget (path );
@@ -234,9 +234,9 @@ private void startup() {
234
234
this .startProcess ();
235
235
236
236
System .out .println ("Successfully started the local wrapper!" );
237
- } catch (IOException e ) {
237
+ } catch (IOException exception ) {
238
238
System .err .println ("Failed to start the local wrapper!" );
239
- e .printStackTrace ();
239
+ exception .printStackTrace ();
240
240
}
241
241
}
242
242
@@ -255,9 +255,9 @@ private void startProcess() throws IOException {
255
255
private void initConsoleThread () {
256
256
this .executorService .execute (() -> {
257
257
InputStream inputStream = this .process .getInputStream ();
258
- this .readStream (inputStream , s -> {
258
+ this .readStream (inputStream , line -> {
259
259
if (this .showConsoleOutput ) {
260
- System .out .println ("LocalWrapper | " + s );
260
+ System .out .println ("LocalWrapper | " + line );
261
261
}
262
262
});
263
263
if (!this .shutdown ) {
@@ -272,9 +272,9 @@ private void initConsoleThread() {
272
272
});
273
273
this .executorService .execute (() -> {
274
274
InputStream inputStream = this .process .getErrorStream ();
275
- this .readStream (inputStream , s -> {
275
+ this .readStream (inputStream , line -> {
276
276
if (this .showConsoleOutput ) {
277
- System .err .println ("LocalWrapper | " + s );
277
+ System .err .println ("LocalWrapper | " + line );
278
278
}
279
279
});
280
280
});
@@ -288,8 +288,8 @@ private void readStream(InputStream inputStream, Consumer<String> consumer) {
288
288
consumer .accept (line );
289
289
}
290
290
}
291
- } catch (IOException e ) {
292
- e .printStackTrace ();
291
+ } catch (IOException exception ) {
292
+ exception .printStackTrace ();
293
293
}
294
294
}
295
295
@@ -310,8 +310,8 @@ private void stop() throws IOException {
310
310
this .process .destroy ();
311
311
}
312
312
System .out .println ("Successfully stopped the local wrapper!" );
313
- } catch (InterruptedException e ) {
314
- e .printStackTrace ();
313
+ } catch (InterruptedException exception ) {
314
+ exception .printStackTrace ();
315
315
}
316
316
}
317
317
0 commit comments