优化Stream close 的判断。
This commit is contained in:
parent
a967c85bf9
commit
570b012c4c
@ -87,6 +87,9 @@ public class IOUtil {
|
|||||||
|
|
||||||
public static void close(Closeable stream) {
|
public static void close(Closeable stream) {
|
||||||
try {
|
try {
|
||||||
|
if(stream == null){
|
||||||
|
return ;
|
||||||
|
}
|
||||||
stream.close();
|
stream.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user