mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add docx check
This commit is contained in:
parent
5d5b62dbd1
commit
3e23982329
@ -3,10 +3,11 @@
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# 5.7.11 (2021-08-27)
|
||||
# 5.7.11 (2021-08-30)
|
||||
|
||||
### 🐣新特性
|
||||
* 【crypto 】 修改SymmetricCrypto初始化逻辑
|
||||
* 【core 】 FileTypeUtil增加对wps编辑的docx的识别(issue#I47JGH@Gitee)
|
||||
|
||||
### 🐞Bug修复
|
||||
|
||||
|
@ -182,6 +182,9 @@ public class FileTypeUtil {
|
||||
final String extName = FileUtil.extName(filename);
|
||||
if ("xlsx".equalsIgnoreCase(extName)) {
|
||||
typeName = "xlsx";
|
||||
} else if ("docx".equalsIgnoreCase(extName)) {
|
||||
// issue#I47JGH
|
||||
typeName = "docx";
|
||||
}
|
||||
}
|
||||
return typeName;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.hutool.core.collection;
|
||||
|
||||
import cn.hutool.core.comparator.ComparableComparator;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
@ -764,4 +765,11 @@ public class CollUtilTest {
|
||||
Assert.assertEquals(1, result.size());
|
||||
Assert.assertEquals(1L, result.get(0), 1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sortComparableTest(){
|
||||
final List<String> of = ListUtil.toList("a", "c", "b");
|
||||
final List<String> sort = CollUtil.sort(of, new ComparableComparator<>());
|
||||
Assert.assertEquals("a,b,c", CollUtil.join(sort, ","));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user