geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsis...@apache.org
Subject svn commit: r407944 - /geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Date Sat, 20 May 2006 02:53:12 GMT
Author: jsisson
Date: Fri May 19 19:53:12 2006
New Revision: 407944

URL: http://svn.apache.org/viewvc?rev=407944&view=rev
Log:
GERONIMO-2035 [system] ensure input streams are closed in finally blocks

Modified:
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java?rev=407944&r1=407943&r2=407944&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
(original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/logging/log4j/Log4jService.java
Fri May 19 19:53:12 2006
@@ -285,6 +285,8 @@
             }
             return configuration.toString();
         } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
             if (in != null) {
                 try {
                     in.close();
@@ -292,7 +294,6 @@
                     e1.printStackTrace();
                 }
             }
-            e.printStackTrace();
         }
         return null;
     }
@@ -413,7 +414,7 @@
             }
             fc.close();
             raf.close();
-        } catch (Exception e) {}
+        } catch (Exception e) {} // TODO: improve exception handling
         return new SearchResults(lineCount, (LogMessage[]) list.toArray(new LogMessage[list.size()]),
capped);
     }
 



Mime
View raw message