Skip to content

Correct file descriptor leak for zip #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@ public CommandResponse call() throws Exception {
return new CommandResponse(-1, msg);
}

/**
* Validate local patch file's digest against the digest stored in ARU.
*
* @param patchNumber the ARU patch number without the 'p'
* @param password the password to be used for the ARU query (Oracle Support credential)
* @return true if the local file digest matches the digest stored in Oracle ARU
* @throws Exception if the ARU call to get patch details failed
*/
private CommandResponse validateAndAddToCache(String patchNumber, String password) throws Exception {
return addToCache(patchNumber);
}

/**
* Add patch to the cache.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,8 +640,7 @@ public static String getCacheDir() throws IOException {

public static String getOpatchVersionFromZip(String fileName) {

try {
ZipFile zipFile = new ZipFile(fileName);
try (ZipFile zipFile = new ZipFile(fileName)) {

Enumeration<? extends ZipEntry> entries = zipFile.entries();

Expand Down