chore: Fix warnings

This commit is contained in:
oSumAtrIX 2024-02-13 05:27:39 +01:00
parent 17a4675a8e
commit 55a5d3bd4e
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
4 changed files with 11 additions and 2 deletions

View File

@ -65,10 +65,10 @@ class PatcherResult internal constructor(
return ( return (
( (
(result * 31) + (result * 31) +
(if (this.resources?.resourcesApk == null) 0 else this.resources?.resourcesApk.hashCode()) (if (this.resources?.resourcesApk == null) 0 else this.resources.resourcesApk.hashCode())
) * 31 ) * 31
) + ) +
(if (this.resources?.doNotCompress == null) 0 else this.resources?.doNotCompress.hashCode()) (if (this.resources?.doNotCompress == null) 0 else this.resources.doNotCompress.hashCode())
} }
@Deprecated("This method is not used anymore") @Deprecated("This method is not used anymore")
@ -85,12 +85,15 @@ class PatcherResult internal constructor(
return false return false
} }
@Suppress("DEPRECATION")
@Deprecated("This method is not used anymore") @Deprecated("This method is not used anymore")
fun getDexFiles() = component1() fun getDexFiles() = component1()
@Suppress("DEPRECATION")
@Deprecated("This method is not used anymore") @Deprecated("This method is not used anymore")
fun getResourceFile() = component2() fun getResourceFile() = component2()
@Suppress("DEPRECATION")
@Deprecated("This method is not used anymore") @Deprecated("This method is not used anymore")
fun getDoNotCompress() = component3() fun getDoNotCompress() = component3()

View File

@ -123,6 +123,7 @@ class BytecodeContext internal constructor(private val config: PatcherConfig) :
DexIO.DEFAULT_MAX_DEX_POOL_SIZE, DexIO.DEFAULT_MAX_DEX_POOL_SIZE,
) { _, entryName, _ -> logger.info("Compiled $entryName") } ) { _, entryName, _ -> logger.info("Compiled $entryName") }
}.listFiles(FileFilter { it.isFile })!!.map { }.listFiles(FileFilter { it.isFile })!!.map {
@Suppress("DEPRECATION")
PatcherResult.PatchedDexFile(it.name, it.inputStream()) PatcherResult.PatchedDexFile(it.name, it.inputStream())
}.toSet() }.toSet()

View File

@ -39,6 +39,7 @@ class ResourceContext internal constructor(
val document = DocumentOperatable() val document = DocumentOperatable()
@Deprecated("Use document instead.") @Deprecated("Use document instead.")
@Suppress("DEPRECATION")
val xmlEditor = XmlFileHolder() val xmlEditor = XmlFileHolder()
/** /**
@ -242,13 +243,16 @@ class ResourceContext internal constructor(
inner class DocumentOperatable { inner class DocumentOperatable {
operator fun get(inputStream: InputStream) = Document(inputStream) operator fun get(inputStream: InputStream) = Document(inputStream)
@Suppress("DEPRECATION")
operator fun get(path: String) = Document(this@ResourceContext[path]) operator fun get(path: String) = Document(this@ResourceContext[path])
} }
@Deprecated("Use DocumentOperatable instead.") @Deprecated("Use DocumentOperatable instead.")
inner class XmlFileHolder { inner class XmlFileHolder {
@Suppress("DEPRECATION")
operator fun get(inputStream: InputStream) = DomFileEditor(inputStream) operator fun get(inputStream: InputStream) = DomFileEditor(inputStream)
@Suppress("DEPRECATION")
operator fun get(path: String): DomFileEditor { operator fun get(path: String): DomFileEditor {
return DomFileEditor(this@ResourceContext[path]) return DomFileEditor(this@ResourceContext[path])
} }

View File

@ -7,6 +7,7 @@ object MethodFingerprintExtensions {
/** /**
* The [FuzzyPatternScanMethod] annotation of a [MethodFingerprint]. * The [FuzzyPatternScanMethod] annotation of a [MethodFingerprint].
*/ */
@Suppress("EXTENSION_SHADOWED_BY_MEMBER")
@Deprecated( @Deprecated(
message = "Use the property instead.", message = "Use the property instead.",
replaceWith = ReplaceWith("this.fuzzyPatternScanMethod"), replaceWith = ReplaceWith("this.fuzzyPatternScanMethod"),