mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
moved try-finally inside the try-catch block (IDEA-CR-30232)
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user