Comments (1)
The new snakeyaml-engine loads regexes.yaml
successfully and fixes this issue.
Here is a Kotlin POC
import org.snakeyaml.engine.v2.api.Load
import org.snakeyaml.engine.v2.api.LoadSettings
import ua_parser.UserAgentParser
fun main() {
val load = Load(LoadSettings.builder().build())
val regexes = UserAgentParser::class.java.getResourceAsStream("/ua_parser/regexes.yaml")!!.use { stream ->
load.loadFromString(stream.reader().readText()) as Map<String, *>
}
println(regexes["user_agent_parsers"])
}
dependencies {
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
api 'org.snakeyaml:snakeyaml-engine:2.3'
api 'com.github.ua-parser:uap-java:1.5.2'
}
from uap-java.
Related Issues (20)
- Building jar doesn't work HOT 1
- maven release HOT 1
- Hi, Benjamin HOT 1
- Why not deploy to maven central? HOT 1
- Third party library or framework integration plan HOT 5
- Please release to include latest changes to UAP-Core HOT 5
- IOException not imported by CacheParser HOT 5
- Update uap-core to 0.13.0 HOT 1
- parse error HOT 2
- UserAgent Parser does not support patchMinor
- CVE-2022-25857 snakeyaml: Denial of Service due to missing nested depth limitation for collections HOT 2
- Migrate yaml parsing to compile phase HOT 2
- Make it possible to use RE2J instead of java.util.regexp HOT 5
- Change yaml parser to org.snakeyaml:snakeyaml-engine HOT 8
- CVE-2022-1471 - Dependency Snakeyaml Critical 9.8 score vulnerability HOT 10
- User-agent with CriOS mapped wrongly
- User-agent with EdgiOS mapped wrongly
- Bring back Java 8 Support HOT 4
- UserAgent Parser does not support brand and model in device
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uap-java.