Skip to content

Commit db2c5b9

Browse files
committed
see 04/25 log
1 parent 37a9fc9 commit db2c5b9

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

utilcode/src/main/java/com/blankj/utilcode/util/FileIOUtils.java

+7
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ public static boolean writeFileFromIS(final File file,
103103
} catch (IOException e) {
104104
e.printStackTrace();
105105
}
106+
try {
107+
if (os != null) {
108+
os.close();
109+
}
110+
} catch (IOException e) {
111+
e.printStackTrace();
112+
}
106113
}
107114
}
108115

utilcode/src/test/java/com/blankj/utilcode/util/StringUtilsTest.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import static org.junit.Assert.assertEquals;
66
import static org.junit.Assert.assertFalse;
7-
import static org.junit.Assert.assertNull;
87
import static org.junit.Assert.assertTrue;
98

109
/**
@@ -79,7 +78,7 @@ public void reverse() throws Exception {
7978
assertEquals("jknalb", StringUtils.reverse("blankj"));
8079
assertEquals("knalb", StringUtils.reverse("blank"));
8180
assertEquals("文中试测", StringUtils.reverse("测试中文"));
82-
assertNull(StringUtils.reverse(null));
81+
assertEquals("", StringUtils.reverse(null));
8382
}
8483

8584
@Test

0 commit comments

Comments
 (0)