geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsis...@apache.org
Subject svn commit: r407948 - /geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtil.java
Date Sat, 20 May 2006 03:23:52 GMT
Author: jsisson
Date: Fri May 19 20:23:51 2006
New Revision: 407948

URL: http://svn.apache.org/viewvc?rev=407948&view=rev
Log:
GERONIMO-2035 - improve outputstream close logic

Modified:
    geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtil.java

Modified: geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtil.java
URL: http://svn.apache.org/viewvc/geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtil.java?rev=407948&r1=407947&r2=407948&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtil.java
(original)
+++ geronimo/branches/1.1/modules/system/src/java/org/apache/geronimo/system/configuration/InPlaceConfigurationUtil.java
Fri May 19 20:23:51 2006
@@ -56,15 +56,14 @@
             File inPlaceConfigurationDir = configurationData.getInPlaceConfigurationDir();
             String absolutePath = inPlaceConfigurationDir.getAbsolutePath();
             writer.write(absolutePath);
+            writer.close(); // also flushes the stream and shouldn't normally fail
+            writer = null;
         } finally {
         	if (null != writer) {
         		try {
-        			writer.flush();
-				} catch (IOException e) {
-				}
-        		try {
         			writer.close();
-				} catch (IOException e) {
+				} catch (IOException ignored) {
+                    // ignored
 				}
         	}
         }



Mime
View raw message