moved try-finally inside the try-catch block (IDEA-CR-30232)

This commit is contained in:
Egor Ushakov
2018-03-07 18:09:34 +03:00
parent a014a4db7f
commit c0fc8627f2
@@ -71,27 +71,24 @@ public class CaptureAgent {
private static void readSettings(String uri) {
Properties properties = new Properties();
File file;
FileReader reader = null;
try {
file = new File(new URI(uri));
reader = new FileReader(file);
properties.load(reader);
FileReader reader = null;
try {
file = new File(new URI(uri));
reader = new FileReader(file);
properties.load(reader);
}
finally {
if (reader != null) {
reader.close();
}
}
}
catch (Exception e) {
System.out.println("Capture agent: unable to read settings");
e.printStackTrace();
return;
}
finally {
if (reader != null) {
try {
reader.close();
}
catch (IOException e) {
e.printStackTrace();
}
}
}
DEBUG = Boolean.parseBoolean(properties.getProperty("debug", "false"));
if (DEBUG) {