8160025: compiler/testlibrary/uncommontrap/Verifier doesn't close FileReader

Reviewed-by: kvn
This commit is contained in:
Igor Ignatyev 2016-06-22 21:24:07 +03:00
parent f6c1efe6ac
commit 300dc664ff

View File

@ -34,6 +34,7 @@ import java.util.Properties;
import java.util.regex.Pattern;
import jdk.test.lib.Asserts;
/**
* Utility tool aimed to verify presence or absence of specified uncommon trap
* in compilation log.
@ -78,7 +79,9 @@ public class Verifier {
PROPERTIES_FILE_SUFFIX);
Properties properties = new Properties();
properties.load(new FileReader(propertiesFile.toFile()));
try (FileReader reader = new FileReader(propertiesFile.toFile())) {
properties.load(reader);
}
if (Boolean.valueOf(properties.getProperty(
VERIFICATION_SHOULD_BE_SKIPPED, "false"))) {