Skip to content

Commit 8608111

Browse files
committed
Use generate instead of empty
1 parent cc4beae commit 8608111

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

src/main/java/io/autoinvestor/domain/model/UserId.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,4 @@ public static UserId generate() {
1414
public static UserId from(String id) {
1515
return new UserId(id);
1616
}
17-
18-
public static UserId empty() {
19-
return new UserId("");
20-
}
2117
}

src/main/java/io/autoinvestor/domain/model/UserState.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public record UserState(
1212
Date updatedAt
1313
) {
1414
public static UserState empty() {
15-
return new UserState(UserId.empty(), FirstName.empty(), LastName.empty(), UserEmail.empty(), RiskLevel.empty(), new Date(), new Date());
15+
return new UserState(UserId.generate(), FirstName.empty(), LastName.empty(), UserEmail.empty(), RiskLevel.empty(), new Date(), new Date());
1616
}
1717

1818
public UserState withUserCreated(UserWasRegisteredEvent event) {

0 commit comments

Comments
 (0)