Skip to content

Commit

Permalink
replace String[] with List<String>
Browse files Browse the repository at this point in the history
due to arrays needing special treatments in records' equal/hashcode computation
  • Loading branch information
overheadhunter committed May 24, 2024
1 parent 92e470c commit c71cfbe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ public List<TrustedUserDto> getTrustedUsers() {
}

public record TrustedUserDto(@JsonProperty("trustedUserId") String trustedUserId,
@JsonProperty("signatureChain") String[] signatureChain) {
@JsonProperty("signatureChain") List<String> signatureChain) {


public static TrustedUserDto fromEntity(EffectiveWot entity) {
return new TrustedUserDto(entity.getId().getTrustedUserId(), entity.getSignatureChain());
return new TrustedUserDto(entity.getId().getTrustedUserId(), List.of(entity.getSignatureChain()));
}
}
}

0 comments on commit c71cfbe

Please sign in to comment.