mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
Opt.ofEmptyAble支持更多类型
This commit is contained in:
@@ -168,7 +168,7 @@ public class OptTest {
|
||||
final List<String> hutool = Opt.ofEmptyAble(Collections.<String>emptyList()).orElseGet(() -> Collections.singletonList("hutool"));
|
||||
Assertions.assertEquals(past, hutool);
|
||||
Assertions.assertEquals(Collections.singletonList("hutool"), hutool);
|
||||
Assertions.assertTrue(Opt.ofEmptyAble(Arrays.asList(null, null, null)).isEmpty());
|
||||
Assertions.assertFalse(Opt.ofEmptyAble(Arrays.asList(null, null, null)).isEmpty());
|
||||
}
|
||||
|
||||
@SuppressWarnings({"MismatchedQueryAndUpdateOfCollection", "ConstantConditions"})
|
||||
|
Reference in New Issue
Block a user