8172767: a bulk of tests failed with FileSystemException on Windows

Reviewed-by: chegar
This commit is contained in:
Xueming Shen 2017-01-13 01:07:50 -08:00
parent 3f70732b40
commit c9ebba358d
2 changed files with 4 additions and 4 deletions

View File

@ -434,8 +434,8 @@ public class Main {
private void validateAndClose(File tmpfile) throws IOException {
if (ok && isMultiRelease) {
try {
ok = Validator.validate(this, tmpfile);
try (JarFile jf = new JarFile(tmpfile)) {
ok = Validator.validate(this, jf);
if (!ok) {
error(formatMsg("error.validator.jarfile.invalid", fname));
}

View File

@ -74,8 +74,8 @@ final class Validator {
loadModuleDescriptor();
}
static boolean validate(Main main, File f) throws IOException {
return new Validator(main, new JarFile(f)).validate();
static boolean validate(Main main, JarFile jf) throws IOException {
return new Validator(main, jf).validate();
}
private boolean validate() {