Skip to content

Commit

Permalink
Remove JavaAbstractMap bridge class.
Browse files Browse the repository at this point in the history
Not necessary after removing the last bridge method `getOrDefault` from `Map` (cl 698750890)

`java.util.AbstractMap` is now a regular emulated class on Kotlin Native and the plain Java class from the Java JRE on JVM and J2CL.

PiperOrigin-RevId: 702032771
  • Loading branch information
martinkretzschmar authored and copybara-github committed Dec 2, 2024
1 parent a6d7ee2 commit dc20433
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import java.lang.IndexOutOfBoundsException
import java.lang.RuntimeException
import java.util.AbstractCollection
import java.util.AbstractList
import javaemul.lang.JavaAbstractMap
import java.util.AbstractMap
import javaemul.lang.JavaMap
import kotlin.Any
import kotlin.Boolean
Expand Down Expand Up @@ -332,7 +332,7 @@ open class Collections {
}

@ObjCName("J2ktJ2ktCollections_CustomMap", exact = true)
open class CustomMap<K, V>: JavaAbstractMap<K, V>() {
open class CustomMap<K, V>: AbstractMap<K, V>() {
override val entries: MutableSet<MutableEntry<K, V>>
get() {
throw RuntimeException()
Expand All @@ -341,46 +341,46 @@ open class Collections {
override fun containsKey(key: K): Boolean {
var key_1: Any? = key
key_1 = Collections.convert<Any?>(key_1)
return super<JavaAbstractMap>.containsKey(key_1 as K)
return super<AbstractMap>.containsKey(key_1 as K)
}

override fun containsValue(value: V): Boolean {
var value_1: Any? = value
value_1 = Collections.convert<Any?>(value_1)
return super<JavaAbstractMap>.containsValue(value_1 as V)
return super<AbstractMap>.containsValue(value_1 as V)
}

override fun remove(key: K): V? {
var key_1: Any? = key
key_1 = Collections.convert<Any?>(key_1)
return super<JavaAbstractMap>.remove(key_1 as K)
return super<AbstractMap>.remove(key_1 as K)
}

override fun remove(key: K, value: V): Boolean {
var value_1: Any? = value
var key_1: Any? = key
key_1 = Collections.convert<Any?>(key_1)
value_1 = Collections.convert<Any?>(value_1)
return super<JavaAbstractMap>.remove(key_1 as K, value_1 as V)
return super<AbstractMap>.remove(key_1 as K, value_1 as V)
}

override fun get(key: K): V? {
var key_1: Any? = key
key_1 = Collections.convert<Any?>(key_1)
return super<JavaAbstractMap>.get(key_1 as K)
return super<AbstractMap>.get(key_1 as K)
}

override fun getOrDefault(key: K, defaultValue: V): V {
val defaultValue_1: V? = defaultValue
var key_1: Any? = key
key_1 = Collections.convert<Any?>(key_1)
return super<JavaAbstractMap>.getOrDefault(key_1 as K, defaultValue_1 as V) as V
return super<AbstractMap>.getOrDefault(key_1 as K, defaultValue_1 as V) as V
}

override fun putAll(m: Map<out K, V>) {
var m_1: MutableMap<out K, out V> = m as MutableMap<out K, out V>
m_1 = Collections.convertMap(m_1)
super<JavaAbstractMap>.putAll(m_1 as Map<out K, V>)
super<AbstractMap>.putAll(m_1 as Map<out K, V>)
}
}

Expand Down

0 comments on commit dc20433

Please sign in to comment.