uap-java
uap-java copied to clipboard
Java implementation of ua-parser
This pull request adds support for https://github.com/ua-parser/uap-core/commit/3021618f6f449e579fb1c8213207071ba37c1f78. It also cleans up the hashCode() methods for the various classes.
The `java.desktop` is a quite huge dependency for a parser, please consider avoiding this dependency or parse the Yaml at compile time (this improves performances too). ~~~ java.lang.NoClassDefFoundError: java/beans/IntrospectionException at...
This is a user-agent of Chrome: ``` Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 ``` There should be a patchMinor in UserAgent.
This commit adds compile only dependencies to Jackson databind, to provide simplified deserialization of ua_parser models for consumers using the library. As this is compile only, no impact is expected...
While working on a project using uap-java, I found it necessary to provide explicit instructions to Jackson for deserialization as there are no default constructors on the models in ua_parser...
The class `CachingParser` uses a `org.apache.commons.collections4.map.LRUMap` internally. The [JavaDoc](https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/LRUMap.html) clearly states: > Note that LRUMap is not synchronized and is not thread-safe. If you wish to use this map from...
- added uap-core git submodule - modified maven build to reflect new project structure - increased versions of dependencies - removed unnecessary exception from `Parser` constructor
Changes: - Update sha-1 of submodule uap-core for new useragents uap-core diff: https://github.com/ua-parser/uap-core/compare/49b141ffe86d5138c332f733d6b2007675bbeb43...23bfabe34b86f29f4840c9dd1ef6129e685581e3 - Add .travis.yml
When using the method CachingParser.parse(), useless caching is done : The CachingParser.parse() uses a cache, then calls its parent Parser.parse() method, which calls Parser.parseUserAgent(), which is overriden by CachingParser.parseUserAgent() wich...
This version is necessary for multithreaded environment. LRUMap from org.apache.commons.collections.map can hang in multithreaded production environment which is fully reproducible in high load.