mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix parse bug
This commit is contained in:
@@ -10,7 +10,7 @@ import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* optional对象判空,参考:https://mp.weixin.qq.com/s/0c8iC0OTtx5LqPkhvkK0tw<br>
|
||||
* from:https://github.com/looly/hutool/pull/1182
|
||||
* from:https://github.com/dromara/hutool/pull/1182
|
||||
*
|
||||
* @param <T> Bean类型
|
||||
* @author totalo
|
||||
@@ -149,4 +149,4 @@ public final class OptionalBean<T> {
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ public class OptionalBeanTest {
|
||||
String value1 = OptionalBean.ofNullable(user)
|
||||
.getBean(User::getSchool)
|
||||
.getBean(User.School::getAddress).get();
|
||||
Assert.assertNull(value1);
|
||||
Assert.assertNull(value1);
|
||||
|
||||
boolean present = OptionalBean.ofNullable(user)
|
||||
.getBean(User::getSchool)
|
||||
|
Reference in New Issue
Block a user