mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
e9aa7b3279
commit
18b6ed1ed1
@ -315,6 +315,10 @@ public class TypeUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定类所有泛型父类和泛型接口
|
* 获取指定类所有泛型父类和泛型接口
|
||||||
|
* <ul>
|
||||||
|
* <li>指定类及其所有的泛型父类</li>
|
||||||
|
* <li>指定类实现的直接泛型接口</li>
|
||||||
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param clazz 类
|
* @param clazz 类
|
||||||
* @return 泛型父类或接口数组
|
* @return 泛型父类或接口数组
|
||||||
|
@ -12,21 +12,28 @@
|
|||||||
|
|
||||||
package org.dromara.hutool.db;
|
package org.dromara.hutool.db;
|
||||||
|
|
||||||
|
import org.dromara.hutool.core.collection.CollUtil;
|
||||||
import org.junit.jupiter.api.Assertions;
|
import org.junit.jupiter.api.Assertions;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
public class IssueI7GUKOTest {
|
public class IssueI7GUKOTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void entityTest() {
|
void entityTest() {
|
||||||
final Entity entity = Entity.of("data")
|
final Entity entity = Entity.of("data")
|
||||||
.set("sort", "test")
|
.set("sort", "")
|
||||||
.set("pcode", "test")
|
.set("pcode", "test")
|
||||||
.set("code", "test")
|
.set("code", "")
|
||||||
.set("define", "test")
|
.set("define", "test")
|
||||||
.set("icon", "test")
|
.set("icon", "")
|
||||||
.set("label", "test")
|
.set("label", "test")
|
||||||
.set("stu", "test");
|
.set("stu", "test");
|
||||||
|
|
||||||
Assertions.assertEquals("[sort, pcode, code, define, icon, label, stu]", entity.keySet().toString());
|
Assertions.assertEquals("[sort, pcode, code, define, icon, label, stu]", entity.keySet().toString());
|
||||||
|
|
||||||
|
final Set<String> keys = CollUtil.removeEmpty(entity.keySet());
|
||||||
|
Assertions.assertEquals("[sort, pcode, code, define, icon, label, stu]", keys.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user