mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复PathUtil.getMimeType可能造成的异常
This commit is contained in:
@@ -93,4 +93,10 @@ public class PathUtilTest {
|
||||
public void moveTest2(){
|
||||
PathUtil.move(Paths.get("D:\\project\\test1.txt"), Paths.get("D:\\project\\test2.txt"), false);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void issue3179Test() {
|
||||
final String mimeType = PathUtil.getMimeType(Paths.get("xxxx.jpg"));
|
||||
Assertions.assertEquals("image/jpeg", mimeType);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user