Skip to content

Commit 98c98e2

Browse files
refactor
1 parent a160101 commit 98c98e2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

api/revanced-patcher.api

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ public final class app/revanced/patcher/Match {
111111
}
112112

113113
public final class app/revanced/patcher/Match$FilterMatch {
114-
public fun <init> (Lapp/revanced/patcher/InstructionFilter;ILcom/android/tools/smali/dexlib2/iface/instruction/Instruction;)V
115114
public final fun getFilter ()Lapp/revanced/patcher/InstructionFilter;
116115
public final fun getIndex ()I
117116
public final fun getInstruction ()Lcom/android/tools/smali/dexlib2/iface/instruction/Instruction;

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)