Minor code cleanup

This commit is contained in:
libraryaddict 2014-05-31 05:34:34 +12:00
parent 2cb8d90158
commit 93f807e6c9

View File

@ -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();
}