git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20@831184 13f79535-47bb-0310-9956-ffa450edef68
@@ -51,6 +51,9 @@ Release 0.20.2 - Unreleased
HDFS-723. Fix deadlock in DFSClient#DFSOutputStream. (hairong)
+ HDFS-732. DFSClient.DFSOutputStream.close() should throw an exception if
+ the stream cannot be closed successfully. (szetszwo)
+
Release 0.20.1 - 2009-09-01
INCOMPATIBLE CHANGES
@@ -3154,8 +3154,13 @@ public class DFSClient implements FSConstants, java.io.Closeable {
*/
@Override
public void close() throws IOException {
- if(closed)
- return;
+ if (closed) {
+ IOException e = lastException;
+ if (e == null)
+ return;
+ else
+ throw e;
+ }
closeInternal();
leasechecker.remove(src);