Workaround to avoid replacing element collections

Relates to #19162
This commit is contained in:
Alexander Schwartz 2023-03-20 14:22:01 +01:00 committed by Václav Muzikář
parent 28975b950d
commit 5252992384

View file

@ -226,8 +226,15 @@ public class ClientEntity {
}
public void setWebOrigins(Set<String> webOrigins) {
// Workaround to avoid a problem in Hibernate 6.2.CR3: https://hibernate.atlassian.net/browse/HHH-16337
// Tracked via GitHub issue: https://github.com/keycloak/keycloak/issues/19162
if (this.webOrigins != null) {
this.webOrigins.clear();
this.webOrigins.addAll(webOrigins);
} else {
this.webOrigins = webOrigins;
}
}
public Set<String> getRedirectUris() {
if (redirectUris == null) {
@ -237,8 +244,15 @@ public class ClientEntity {
}
public void setRedirectUris(Set<String> redirectUris) {
// Workaround to avoid a problem in Hibernate 6.2.CR3: https://hibernate.atlassian.net/browse/HHH-16337
// Tracked via GitHub issue: https://github.com/keycloak/keycloak/issues/19162
if (this.redirectUris != null) {
this.redirectUris.clear();
this.redirectUris.addAll(redirectUris);
} else {
this.redirectUris = redirectUris;
}
}
public String getClientAuthenticatorType() {
return clientAuthenticatorType;