mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-01 05:44:24 +02:00
fix: make warnings nullable instead of lateinit
This commit is contained in:
parent
e6086511e5
commit
8f1a629191
@ -88,7 +88,7 @@ interface PatternScanMethod {
|
|||||||
* or the signature was not yet resolved,
|
* or the signature was not yet resolved,
|
||||||
* the list will be null.
|
* the list will be null.
|
||||||
*/
|
*/
|
||||||
lateinit var warnings: List<Warning>
|
var warnings: List<Warning>? = null
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a resolver warning.
|
* Represents a resolver warning.
|
||||||
|
@ -18,9 +18,13 @@ internal class PatcherTest {
|
|||||||
val patternScanMethod = signature.metadata.patternScanMethod
|
val patternScanMethod = signature.metadata.patternScanMethod
|
||||||
if (patternScanMethod is PatternScanMethod.Fuzzy) {
|
if (patternScanMethod is PatternScanMethod.Fuzzy) {
|
||||||
val warnings = patternScanMethod.warnings
|
val warnings = patternScanMethod.warnings
|
||||||
println("Signature ${signature.metadata.name} had ${warnings.size} warnings!")
|
if (warnings != null) {
|
||||||
for (warning in warnings) {
|
println("Signature ${signature.metadata.name} had ${warnings.size} warnings!")
|
||||||
println(warning.toString())
|
for (warning in warnings) {
|
||||||
|
println(warning.toString())
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
println("Signature ${signature.metadata.name} used the fuzzy resolver, but the warnings list is null!")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user