浏览代码

HADOOP-2799. Deprecate o.a.h.io.Closable in favor of java.io.Closable.
Contributed by Tsz Wo (Nicholas), SZE.



git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk@652619 13f79535-47bb-0310-9956-ffa450edef68

Christopher Douglas 17 年之前
父节点
当前提交
5c0ac7a4b7
共有 2 个文件被更改,包括 6 次插入9 次删除
  1. 3 0
      CHANGES.txt
  2. 3 9
      src/java/org/apache/hadoop/io/Closeable.java

+ 3 - 0
CHANGES.txt

@@ -69,6 +69,9 @@ Trunk (unreleased changes)
     HADOOP-2461. Trim property names in configuration.
     (Tsz Wo (Nicholas), SZE via shv)
 
+    HADOOP-2799. Deprecate o.a.h.io.Closable in favor of java.io.Closable.
+    (Tsz Wo (Nicholas), SZE via cdouglas)
+
   OPTIMIZATIONS
 
     HADOOP-3274. The default constructor of BytesWritable creates empty 

+ 3 - 9
src/java/org/apache/hadoop/io/Closeable.java

@@ -18,13 +18,7 @@
 
 package org.apache.hadoop.io;
 
-import java.io.IOException;
-
-// NOTE: Replace with java.io.Closeable when we upgrade to Java 1.5.
-
-/** That which can be closed. */
-public interface Closeable {
-  /** Called after the last call to any other method on this object to free
-   * and/or flush resources.  Typical implementations do nothing. */
-  void close() throws IOException;
+/** @deprecated use java.io.Closeable */
+@Deprecated
+public interface Closeable extends java.io.Closeable{
 }