mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-09-12 01:48:07 +02:00
Minor code cleanup
This commit is contained in:
parent
2cb8d90158
commit
93f807e6c9
@ -144,10 +144,11 @@ public class LibsDisguises extends JavaPlugin {
|
|||||||
|
|
||||||
private String read(Reader reader) {
|
private String read(Reader reader) {
|
||||||
String toWrite = "";
|
String toWrite = "";
|
||||||
|
BufferedReader input = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
BufferedReader input = new BufferedReader(reader);
|
input = new BufferedReader(reader);
|
||||||
String currentPath = "";
|
String currentPath = "";
|
||||||
try {
|
|
||||||
String line;
|
String line;
|
||||||
|
|
||||||
while ((line = input.readLine()) != null) {
|
while ((line = input.readLine()) != null) {
|
||||||
@ -173,14 +174,20 @@ public class LibsDisguises extends JavaPlugin {
|
|||||||
toWrite += "\n";
|
toWrite += "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
input.close();
|
|
||||||
}
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
} finally {
|
} finally {
|
||||||
try {
|
try {
|
||||||
|
if (input != null) {
|
||||||
|
input.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (reader != null) {
|
||||||
reader.close();
|
reader.close();
|
||||||
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user