mirror of https://github.com/apache/openjpa.git
OPENJPA-2674 properly closing JarFile
txs to Kaloyan Spiridonov for the catch! git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1768201 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
701a4e7d27
commit
4068d5ccb2
|
@ -369,10 +369,8 @@ public class InstrumentationFactory {
|
|||
* @return True if the provided agentClassName is defined as the Agent-Class
|
||||
* in the manifest from the provided agentJarFile. False otherwise.
|
||||
*/
|
||||
private static boolean validateAgentJarManifest(File agentJarFile, Log log,
|
||||
String agentClassName) {
|
||||
try {
|
||||
JarFile jar = new JarFile(agentJarFile);
|
||||
private static boolean validateAgentJarManifest(File agentJarFile, Log log, String agentClassName) {
|
||||
try (JarFile jar = new JarFile(agentJarFile)) {
|
||||
Manifest manifest = jar.getManifest();
|
||||
if (manifest == null) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue