diff --git a/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/AccountInfo.java b/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/AccountInfo.java index 3fcafbb..ed03983 100644 --- a/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/AccountInfo.java +++ b/plusone-system/plusone-system-domain/src/main/java/xyz/zhouxy/plusone/system/domain/model/account/AccountInfo.java @@ -38,6 +38,6 @@ public class AccountInfo implements IValueObject { } catch (MalformedURLException e) { throw new IllegalArgumentException(e); } - return new AccountInfo(Nickname.ofNullable(nickname), avatarURL, Objects.nonNull(sex) ? sex : Sex.UNSET); + return new AccountInfo(Nickname.ofNullable(nickname), avatarURL, sex); } }