HDFS-12264. DataNode uses a deprecated method IoUtils#cleanup. Contributed by Ajay Yadav.

This commit is contained in:
Arpit Agarwal 2017-08-07 15:05:10 -07:00
parent e18415a350
commit 2906c494c5

View File

@ -293,7 +293,9 @@ public static void cleanupWithLogger(Logger logger,
* @param stream the Stream to close
*/
public static void closeStream(java.io.Closeable stream) {
cleanup(null, stream);
if (stream != null) {
cleanupWithLogger(null, stream);
}
}
/**