Support Migration Notice: To update migrated JIRA cases click here to open a new case use www.vmware.com/go/sr | vFabric Hyperic 5.7.0 is Now Available

Hyperic HQ

JarFiles need to be properly closed in the places they are used.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 4.5.1.3
  • Fix Version/s: 4.6
  • Component/s: None
  • Case Links:
    none
  • Regression:
    No
  • Tags:

Description

While fixing another bug, spotted that JarFile's are not properly closed, which can cause file handles to leak in the system.

find . -name '*.java' -exec grep "new JarFile" {} \; -print
JarFile jarFile = new JarFile(libJars[i]);
./hq-agent/hq-agent-core/src/main/java/org/hyperic/hq/agent/server/AgentDaemon.java
JarFile jar = new JarFile(file);
./hq-pdk/src/main/java/org/hyperic/snmp/MIBTree.java
JarFile jarFile = new JarFile(file);
./hq-plugin/jboss-plugin/src/main/java/org/hyperic/hq/plugin/jboss/JBossDetector.java
JarFile jar = new JarFile(file);
./hq-plugin/websphere-plugin/src/main/java/org/hyperic/hq/plugin/websphere/WebsphereProductPlugin.java
JarFile jar = new JarFile(pluginJarFile);
./hq-server/src/main/java/org/hyperic/hq/product/server/session/ProductPluginDeployer.java
JarFile jar = new JarFile(file, false);
./hq-util/src/main/java/org/hyperic/util/security/MD5.java

Activity

Hide
Greg Turnquist added a comment -

This is the original issue where not closing JarFile's was causing issues. Did a search and found other blocks of code doing the same thing.

Show
Greg Turnquist added a comment - This is the original issue where not closing JarFile's was causing issues. Did a search and found other blocks of code doing the same thing.
Hide
Ryan Morgan added a comment -


Mark 4.6 per CE Triage.

Show
Ryan Morgan added a comment - Mark 4.6 per CE Triage.
Hide
Greg Turnquist added a comment -

Checked situations where new JarFile() exists, and made sure that it is properly closed.

Show
Greg Turnquist added a comment - Checked situations where new JarFile() exists, and made sure that it is properly closed.
Hide
Merav Dagany Mizrahi added a comment -

Closed on 6.0.0 build 314.
(Open jar files are not exist anymore)

Show
Merav Dagany Mizrahi added a comment - Closed on 6.0.0 build 314. (Open jar files are not exist anymore)

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:
    Last comment:
    1 year, 6 weeks ago