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) {
|
||||
String toWrite = "";
|
||||
BufferedReader input = null;
|
||||
|
||||
try {
|
||||
BufferedReader input = new BufferedReader(reader);
|
||||
input = new BufferedReader(reader);
|
||||
String currentPath = "";
|
||||
try {
|
||||
String line;
|
||||
|
||||
while ((line = input.readLine()) != null) {
|
||||
@ -173,14 +174,20 @@ public class LibsDisguises extends JavaPlugin {
|
||||
toWrite += "\n";
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
input.close();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (input != null) {
|
||||
input.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
try {
|
||||
if (reader != null) {
|
||||
reader.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user