1
mirror of https://github.com/revanced/revanced-patcher synced 2024-11-24 05:16:22 +01:00

add: throw on getting result of MethodSignature if null

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX 2022-04-14 09:44:32 +02:00
parent 1f08da8b2a
commit c55c62a57e
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -1,5 +1,6 @@
package app.revanced.patcher.signature
import app.revanced.patcher.MethodNotFoundException
import org.jf.dexlib2.Opcode
/**
@ -21,6 +22,11 @@ class MethodSignature(
* The result of the signature
*/
var result: SignatureResolverResult? = null // TODO: figure out how to get rid of nullable
get() {
return field ?: throw MethodNotFoundException(
"Could not resolve required signature ${methodSignatureMetadata.name}"
)
}
}
/**