diff --git a/plugins/TestingList.java b/plugins/TestingList.java index da18cf3..de261ad 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -1490,6 +1490,7 @@ public class TestingList extends Panel { if (configFile.exists() && !configFile.isDirectory()) { InputStream is = new FileInputStream(configFile); propDevice.load(is); + is.close(); //config of device was loaded. now load the config of each test belonging to the device testsFolder = Paths.get(TESTS_TESTS_DEFAULT_DIR.toString(), propDevice.getProperty("tests")).toFile(); if (testsFolder.exists() && testsFolder.isDirectory()) { @@ -1501,6 +1502,7 @@ public class TestingList extends Panel { if (configFile.exists() && !configFile.isDirectory()) { InputStream ist = new FileInputStream(configFile); propTest.load(ist); + ist.close(); addToTable(propDevice.getProperty("name"), propDevice.getProperty("description"), propDevice.getProperty("tests"), @@ -1509,12 +1511,10 @@ public class TestingList extends Panel { "", //test description propTest.getProperty("help")); iCounter++; - ist.close(); } } } } - is.close(); } } } @@ -1550,6 +1550,7 @@ public class TestingList extends Panel { if (configFile.exists() && !configFile.isDirectory()) { InputStream is = new FileInputStream(configFile); propDevice.load(is); + is.close(); //config of device was loaded. now load the config of each test belonging to the device testsFolder = Paths.get(TESTS_TESTS_DEFAULT_DIR.toString(), propDevice.getProperty("tests")).toFile(); if (testsFolder.exists() && testsFolder.isDirectory()) { @@ -1572,7 +1573,6 @@ public class TestingList extends Panel { } } } - is.close(); } } } @@ -1681,11 +1681,12 @@ public class TestingList extends Panel { try { InputStream ist = new FileInputStream(configFile); propTest.load(ist); + ist.close(); testParams = propTest.getProperty(sParameterName); if (testParams == null) { testParams = ""; } - ist.close(); + } catch (IOException ex) { Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex); }