mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
Opt添加ifFail方法
This commit is contained in:
@@ -6,6 +6,7 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import javax.management.monitor.MonitorSettingException;
|
||||
@@ -210,7 +211,9 @@ public class OptTest {
|
||||
private String nickname;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"NumericOverflow", "divzero"})
|
||||
@Test
|
||||
@Disabled
|
||||
void testFail() {
|
||||
Opt.ofTry(() -> 1 / 0)
|
||||
.ifFail(Console::log)
|
||||
|
Reference in New Issue
Block a user