
jvmMain.com.algolia.search.util.CloseableJVM.kt Maven / Gradle / Ivy
package com.algolia.search.util
import java.lang.reflect.Method
public actual typealias Closeable = java.io.Closeable
@PublishedApi
internal actual fun Throwable.addSuppressedInternal(other: Throwable) {
AddSuppressedMethod?.invoke(this, other)
}
private val AddSuppressedMethod: Method? by lazy {
try {
Throwable::class.java.getMethod("addSuppressed", Throwable::class.java)
} catch (t: Throwable) {
null
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy