Skip to content

Commit 3f19f5b

Browse files
committed
Suppress redundant warnings
1 parent 44109ca commit 3f19f5b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

templates/android/library/src/main/java/io/appwrite/Client.kt.twig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,12 @@ class Client @JvmOverloads constructor(
126126
try {
127127
// Create a trust manager that does not validate certificate chains
128128
val trustAllCerts = arrayOf<TrustManager>(
129+
@Suppress("CustomX509TrustManager")
129130
object : X509TrustManager {
131+
@Suppress("TrustAllX509TrustManager")
130132
override fun checkClientTrusted(chain: Array<X509Certificate>, authType: String) {
131133
}
134+
@Suppress("TrustAllX509TrustManager")
132135
override fun checkServerTrusted(chain: Array<X509Certificate>, authType: String) {
133136
}
134137
override fun getAcceptedIssuers(): Array<X509Certificate> {
@@ -312,6 +315,7 @@ class Client @JvmOverloads constructor(
312315
it.cancel(e)
313316
}
314317

318+
@Suppress("UNCHECKED_CAST")
315319
override fun onResponse(call: Call, response: Response) {
316320
if (!response.isSuccessful) {
317321
val body = response.body!!

templates/android/library/src/main/java/io/appwrite/models/Model.kt.twig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ data class {{ definition.name | caseUcfirst }}(
1818
{% endif %}
1919
) {
2020
companion object {
21+
@Suppress("UNCHECKED_CAST")
2122
fun from(map: Map<String, Any>) = {{ definition.name | caseUcfirst }}(
2223
{% for property in definition.properties %}
2324
{{ property.name | escapeKeyword | removeDollarSign }} = {% if property.sub_schema %}{% if property.type == 'array' %}(map["{{ property.name | escapeDollarSign }}"] as List<Map<String, Any>>).map { {{property.sub_schema | caseUcfirst}}.from(map = it) }{% else %}{{property.sub_schema | caseUcfirst}}.from(map = map["{{property.name | escapeDollarSign }}"] as Map<String, Any>){% endif %}{% else %}map["{{ property.name | escapeDollarSign }}"] as{% if not property.required %}?{% endif %} {{ _self.sub_schema(property) }}{% endif %}{% if not loop.last or (loop.last and definition.additionalProperties) %},{% endif %}

0 commit comments

Comments
 (0)