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
} else {
val bytecodeData = data.bytecodeData
(patchInstance as BytecodePatch).fingerprints.resolve(bytecodeData, bytecodeData.classes.internalClasses)
(patchInstance as BytecodePatch).fingerprints?.resolve(bytecodeData, bytecodeData.classes.internalClasses)
bytecodeData
}

View file

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