mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01:00
fix: make warnings nullable instead of lateinit
This commit is contained in:
parent
e6086511e5
commit
8f1a629191
2 changed files with 8 additions and 4 deletions
|
@ -88,7 +88,7 @@ interface PatternScanMethod {
|
|||
* or the signature was not yet resolved,
|
||||
* the list will be null.
|
||||
*/
|
||||
lateinit var warnings: List<Warning>
|
||||
var warnings: List<Warning>? = null
|
||||
|
||||
/**
|
||||
* Represents a resolver warning.
|
||||
|
|
|
@ -18,9 +18,13 @@ internal class PatcherTest {
|
|||
val patternScanMethod = signature.metadata.patternScanMethod
|
||||
if (patternScanMethod is PatternScanMethod.Fuzzy) {
|
||||
val warnings = patternScanMethod.warnings
|
||||
println("Signature ${signature.metadata.name} had ${warnings.size} warnings!")
|
||||
for (warning in warnings) {
|
||||
println(warning.toString())
|
||||
if (warnings != null) {
|
||||
println("Signature ${signature.metadata.name} had ${warnings.size} warnings!")
|
||||
for (warning in warnings) {
|
||||
println(warning.toString())
|
||||
}
|
||||
} else {
|
||||
println("Signature ${signature.metadata.name} used the fuzzy resolver, but the warnings list is null!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue