Fixed compile warnings

This commit is contained in:
nathan 2020-09-09 15:12:32 +02:00
parent d0787fc12f
commit ca88b9941f
2 changed files with 4 additions and 1 deletions

View File

@ -155,7 +155,7 @@ object RmiUtils {
var iface_OR_ImplMethodAccess = ifaceAsmMethodAccess
// reflectAsm doesn't like "Object" class methods
val canUseAsm = asmEnabled && method.declaringClass != Any::class.java
val canUseAsm = asmEnabled && declaringClass != Any::class.java
var overwrittenMethod: Method? = null
// this is how we detect if the method has been changed from the interface -> implementation + connection parameter
@ -447,6 +447,7 @@ object RmiUtils {
return packedInt.toShort().toInt()
}
@Suppress("EXPERIMENTAL_API_USAGE")
fun unpackUnsignedRight(packedInt: Int): Int {
return packedInt.toUShort().toInt()
}

View File

@ -417,6 +417,8 @@ open class Serialization(private val references: Boolean = true, private val fac
classesToRegister.forEach { registration ->
require(registration is ClassRegistrationForRmi) { "Unable to initialize a class registrations for anything OTHER than RMI!! To fix this, remove ${registration.clazz}" }
}
@Suppress("UNCHECKED_CAST")
val classesToRegisterForRmi = listOf(*classesToRegister.toTypedArray()) as List<ClassRegistrationForRmi>
classesToRegister.clear()