We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6712f0e commit 1358d3fCopy full SHA for 1358d3f
src/main/kotlin/app/revanced/patcher/Fingerprint.kt
@@ -72,18 +72,16 @@ class Fingerprint internal constructor(
72
internal fun matchOrNull(): Match? {
73
if (_matchOrNull != null) return _matchOrNull
74
75
- val lookupMaps = lookupMaps
76
-
77
- // Find the first
78
- var match = strings?.firstNotNullOfOrNull { lookupMaps.methodsByStrings[it] }?.let { methodClasses ->
+ var match = strings?.mapNotNull {
+ lookupMaps.methodsByStrings[it]
+ }?.minByOrNull { it.size }?.let { methodClasses ->
79
methodClasses.forEach { (classDef, method) ->
80
val match = matchOrNull(classDef, method)
81
if (match != null) return@let match
82
}
83
84
null
85
86
87
if (match != null) return match
88
89
classes.forEach { classDef ->
0 commit comments