felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccust...@apache.org
Subject svn commit: r785868 - /felix/trunk/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java
Date Thu, 18 Jun 2009 00:34:34 GMT
Author: ccustine
Date: Thu Jun 18 00:34:34 2009
New Revision: 785868

URL: http://svn.apache.org/viewvc?rev=785868&view=rev
Log:
FELIX-1199 - Karaf: closing IO stream, removal of minor file descriptor leak.

Modified:
    felix/trunk/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java

Modified: felix/trunk/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java?rev=785868&r1=785867&r2=785868&view=diff
==============================================================================
--- felix/trunk/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java (original)
+++ felix/trunk/karaf/main/src/main/java/org/apache/felix/karaf/main/Main.java Thu Jun 18
00:34:34 2009
@@ -175,7 +175,9 @@
             // Start up the OSGI framework
 
             InputStream is = getClass().getResourceAsStream("/META-INF/services/" + FrameworkFactory.class.getName());
-            String factoryClass = new BufferedReader(new InputStreamReader(is, "UTF-8")).readLine();
+            BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+            String factoryClass = br.readLine();
+            br.close();
             FrameworkFactory factory = (FrameworkFactory) getClass().getClassLoader().loadClass(factoryClass).newInstance();
             framework = factory.newFramework(new StringMap(configProps, false));
             framework.start();



Mime
View raw message