修改 Optional.map 方法的错误使用。

pull/1/head
ZhouXY108 2023-02-26 13:49:03 +08:00
parent a0b16afde2
commit 5d9e6ae5b3
1 changed files with 1 additions and 1 deletions

View File

@ -35,6 +35,6 @@ public abstract class ValidatableStringRecord implements IValueObject {
}
public static String getValueOrNull(Optional<? extends ValidatableStringRecord> s) {
return s.map(ValidatableStringRecord::value).orElse(null);
return s.isPresent() ? s.get().value() : null;
}
}