Skip to content

Commit 84739dd

Browse files
refactor
1 parent a160101 commit 84739dd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/kotlin/app/revanced/patcher/Fingerprint.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,11 @@ class Fingerprint internal constructor(
361361
context(BytecodePatchContext)
362362
val patternMatchOrNull : PatternMatch?
363363
get() {
364-
if (matchOrNull == null || matchOrNull!!.filterMatches == null) {
364+
val match = this.matchOrNull
365+
if (match == null || match.filterMatches == null) {
365366
return null
366367
}
367-
return matchOrNull!!.patternMatch
368+
return match.patternMatch
368369
}
369370

370371
/**
@@ -483,7 +484,7 @@ class Match internal constructor(
483484
*/
484485
val method by lazy { classDef.methods.first { MethodUtil.methodSignaturesMatch(it, originalMethod) } }
485486

486-
@Deprecated("Instead use filterMatch")
487+
@Deprecated("Instead use filterMatches", ReplaceWith("filterMatches"))
487488
val patternMatch by lazy {
488489
if (filterMatches == null) throw PatchException("Did not match $this")
489490
PatternMatch(filterMatches!!.first().index, filterMatches.last().index)
@@ -506,7 +507,7 @@ class Match internal constructor(
506507
* @param index The instruction index it matched with.
507508
* @param instruction The instruction that matched.
508509
*/
509-
class FilterMatch(
510+
class FilterMatch internal constructor(
510511
val filter : InstructionFilter,
511512
val index: Int,
512513
val instruction: Instruction

0 commit comments

Comments
 (0)