feat: nullability for BytecodePatch constructor (#59)

This commit is contained in:
bogadana 2022-07-05 16:46:54 +02:00 committed by GitHub
parent 4cc2fa17f5
commit 4ea030d0a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -285,7 +285,7 @@ class Patcher(private val options: PatcherOptions) {
data.resourceData data.resourceData
} else { } else {
val bytecodeData = data.bytecodeData val bytecodeData = data.bytecodeData
(patchInstance as BytecodePatch).fingerprints.resolve(bytecodeData, bytecodeData.classes.internalClasses) (patchInstance as BytecodePatch).fingerprints?.resolve(bytecodeData, bytecodeData.classes.internalClasses)
bytecodeData bytecodeData
} }

View File

@ -9,5 +9,5 @@ import app.revanced.patcher.patch.Patch
* @param fingerprints A list of [MethodFingerprint] this patch relies on. * @param fingerprints A list of [MethodFingerprint] this patch relies on.
*/ */
abstract class BytecodePatch( abstract class BytecodePatch(
internal val fingerprints: Iterable<MethodFingerprint> internal val fingerprints: Iterable<MethodFingerprint>? = null
) : Patch<BytecodeData>() ) : Patch<BytecodeData>()