Update to UA Parser 1.5.4 and use CachingParser

closes #16729
This commit is contained in:
Douglas Palmer 2023-02-28 15:03:37 -08:00 committed by Marek Posolda
parent 9052ec2b02
commit 181e1b914f
2 changed files with 3 additions and 2 deletions

View file

@ -114,7 +114,7 @@
<xmlsec.version>2.2.3</xmlsec.version> <xmlsec.version>2.2.3</xmlsec.version>
<wildfly.common.version>1.6.0.Final</wildfly.common.version> <wildfly.common.version>1.6.0.Final</wildfly.common.version>
<nashorn.version>15.3</nashorn.version> <nashorn.version>15.3</nashorn.version>
<ua-parser.version>1.5.2</ua-parser.version> <ua-parser.version>1.5.4</ua-parser.version>
<picketbox.version>5.0.3.Final</picketbox.version> <picketbox.version>5.0.3.Final</picketbox.version>
<google.guava.version>30.1-jre</google.guava.version> <google.guava.version>30.1-jre</google.guava.version>
<xstream.version>1.4.20</xstream.version> <xstream.version>1.4.20</xstream.version>

View file

@ -1,6 +1,7 @@
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 {
@ -23,7 +24,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 Parser(); parser = new CachingParser();
} }
} }
} }