From dc2043380bde5d63963b0a4c0481475bf3718b87 Mon Sep 17 00:00:00 2001 From: Martin Kretzschmar Date: Mon, 2 Dec 2024 11:30:37 -0800 Subject: [PATCH] Remove `JavaAbstractMap` bridge class. 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 --- .../java/j2kt/output_kt/Collections.kt.txt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/transpiler/javatests/com/google/j2cl/readable/java/j2kt/output_kt/Collections.kt.txt b/transpiler/javatests/com/google/j2cl/readable/java/j2kt/output_kt/Collections.kt.txt index 55f9f74ad1..353996c0f2 100644 --- a/transpiler/javatests/com/google/j2cl/readable/java/j2kt/output_kt/Collections.kt.txt +++ b/transpiler/javatests/com/google/j2cl/readable/java/j2kt/output_kt/Collections.kt.txt @@ -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 @@ -332,7 +332,7 @@ open class Collections { } @ObjCName("J2ktJ2ktCollections_CustomMap", exact = true) - open class CustomMap: JavaAbstractMap() { + open class CustomMap: AbstractMap() { override val entries: MutableSet> get() { throw RuntimeException() @@ -341,19 +341,19 @@ open class Collections { override fun containsKey(key: K): Boolean { var key_1: Any? = key key_1 = Collections.convert(key_1) - return super.containsKey(key_1 as K) + return super.containsKey(key_1 as K) } override fun containsValue(value: V): Boolean { var value_1: Any? = value value_1 = Collections.convert(value_1) - return super.containsValue(value_1 as V) + return super.containsValue(value_1 as V) } override fun remove(key: K): V? { var key_1: Any? = key key_1 = Collections.convert(key_1) - return super.remove(key_1 as K) + return super.remove(key_1 as K) } override fun remove(key: K, value: V): Boolean { @@ -361,26 +361,26 @@ open class Collections { var key_1: Any? = key key_1 = Collections.convert(key_1) value_1 = Collections.convert(value_1) - return super.remove(key_1 as K, value_1 as V) + return super.remove(key_1 as K, value_1 as V) } override fun get(key: K): V? { var key_1: Any? = key key_1 = Collections.convert(key_1) - return super.get(key_1 as K) + return super.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(key_1) - return super.getOrDefault(key_1 as K, defaultValue_1 as V) as V + return super.getOrDefault(key_1 as K, defaultValue_1 as V) as V } override fun putAll(m: Map) { var m_1: MutableMap = m as MutableMap m_1 = Collections.convertMap(m_1) - super.putAll(m_1 as Map) + super.putAll(m_1 as Map) } }