mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-25 15:20:11 +00:00
8160025: compiler/testlibrary/uncommontrap/Verifier doesn't close FileReader
Reviewed-by: kvn
This commit is contained in:
parent
f6c1efe6ac
commit
300dc664ff
@ -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"))) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user