fix(fingerprint): do not throw on MethodFingerprint.result getter

Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
oSumAtrIX 2022-09-18 07:34:32 +02:00
parent 4485af8036
commit 2f7e62ef65
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -1,8 +1,6 @@
package app.revanced.patcher.fingerprint.method.impl
import app.revanced.patcher.data.impl.BytecodeData
import app.revanced.patcher.data.impl.MethodNotFoundException
import app.revanced.patcher.extensions.MethodFingerprintExtensions.name
import app.revanced.patcher.extensions.softCompareTo
import app.revanced.patcher.fingerprint.Fingerprint
import app.revanced.patcher.fingerprint.method.utils.MethodFingerprintUtils
@ -31,10 +29,8 @@ abstract class MethodFingerprint(
) : Fingerprint {
/**
* The result of the [MethodFingerprint] the [Method].
* @throws MethodNotFoundException If the resolution of the [Method] has not happened.
*/
var result: MethodFingerprintResult? = null
get() = field ?: throw Exception("${this.name} has not been resolved yet.")
}
/**