[jira] [Updated] (KAFKA-2130) Resource leakage in AppInfo.scala during initialization
[ https://issues.apache.org/jira/browse/KAFKA-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebastien Zimmer updated KAFKA-2130: Status: Patch Available (was: Open) diff --git a/core/src/main/scala/kafka/common/AppInfo.scala b/core/src/main/scala/kafka/common/AppInfo.scala index d642ca5..ecc1dc5 100644 --- a/core/src/main/scala/kafka/common/AppInfo.scala +++ b/core/src/main/scala/kafka/common/AppInfo.scala @@ -45,8 +45,10 @@ object AppInfo extends KafkaMetricsGroup { val manifestPath = classPath.substring(0, classPath.lastIndexOf("!") + 1) + "/META-INF/MANIFEST.MF" val mf = new Manifest - mf.read(new URL(manifestPath).openStream()) + val stream = new URL(manifestPath).openStream() + mf.read(stream) val version = mf.getMainAttributes.get(new Attributes.Name("Version")).toString + stream.close() newGauge("Version", new Gauge[String] { > Resource leakage in AppInfo.scala during initialization > --- > > Key: KAFKA-2130 > URL: https://issues.apache.org/jira/browse/KAFKA-2130 > Project: Kafka > Issue Type: Bug >Reporter: Sebastien Zimmer >Priority: Trivial > Labels: patch > > Minor InputStream leakage during the server initialization in AppInfo.scala. > Patch attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2130) Resource leakage in AppInfo.scala during initialization
[ https://issues.apache.org/jira/browse/KAFKA-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sebastien Zimmer updated KAFKA-2130: Attachment: patch.diff > Resource leakage in AppInfo.scala during initialization > --- > > Key: KAFKA-2130 > URL: https://issues.apache.org/jira/browse/KAFKA-2130 > Project: Kafka > Issue Type: Bug >Reporter: Sebastien Zimmer >Priority: Trivial > Labels: patch > Attachments: patch.diff > > > Minor InputStream leakage during the server initialization in AppInfo.scala. > Patch attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (KAFKA-2130) Resource leakage in AppInfo.scala during initialization
[ https://issues.apache.org/jira/browse/KAFKA-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manikumar Reddy updated KAFKA-2130: --- Resolution: Fixed Assignee: Manikumar Reddy Fix Version/s: 0.8.3 Status: Resolved (was: Patch Available) Problematic code is removed ad part of KAFKA-1901. > Resource leakage in AppInfo.scala during initialization > --- > > Key: KAFKA-2130 > URL: https://issues.apache.org/jira/browse/KAFKA-2130 > Project: Kafka > Issue Type: Bug >Reporter: Sebastien Zimmer >Assignee: Manikumar Reddy >Priority: Trivial > Labels: patch > Fix For: 0.8.3 > > Attachments: patch.diff > > > Minor InputStream leakage during the server initialization in AppInfo.scala. > Patch attached. -- This message was sent by Atlassian JIRA (v6.3.4#6332)