mirror of
https://gitee.com/dromara/hutool.git
synced 2025-09-20 02:29:47 +08:00
修复EnumUtil空指针问题
This commit is contained in:
@@ -17,7 +17,6 @@ public class IssueI9NSZ4Test {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void getByTest2() {
|
public void getByTest2() {
|
||||||
// AnimalKindInZoo所有枚举结果的getMappedValue结果值中都无AnimalKind.DOG,返回null
|
|
||||||
final AnimalKindInZoo by = EnumUtil.getBy(AnimalKindInZoo::getMappedValue, AnimalKind.BIRD);
|
final AnimalKindInZoo by = EnumUtil.getBy(AnimalKindInZoo::getMappedValue, AnimalKind.BIRD);
|
||||||
Assert.assertEquals(AnimalKindInZoo.BIRD, by);
|
Assert.assertEquals(AnimalKindInZoo.BIRD, by);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user