Reverted back to Parser from CachingParser due to thread safety concerns

closes #16729
This commit is contained in:
Douglas Palmer 2023-03-09 07:47:42 -08:00 committed by Marek Posolda
parent 6ad3005717
commit 4a382752aa

View file

@ -1,7 +1,6 @@
package org.keycloak.device; package org.keycloak.device;
import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
import ua_parser.CachingParser;
import ua_parser.Parser; import ua_parser.Parser;
public class DeviceRepresentationProviderFactoryImpl implements DeviceRepresentationProviderFactory { public class DeviceRepresentationProviderFactoryImpl implements DeviceRepresentationProviderFactory {
@ -24,7 +23,7 @@ public class DeviceRepresentationProviderFactoryImpl implements DeviceRepresenta
private void lazyInit(KeycloakSession session) { private void lazyInit(KeycloakSession session) {
if(parser == null) { if(parser == null) {
synchronized (this) { synchronized (this) {
parser = new CachingParser(); parser = new Parser();
} }
} }
} }