Minor. Methods renamed to reflect tha fact that they handle more types than just collections
This commit is contained in:
committed by
Denis Zharkov
parent
579ca9c1f2
commit
d140e83386
+1
-1
@@ -162,7 +162,7 @@ class LazyJavaTypeResolver(
|
||||
val kotlinDescriptor = javaToKotlin.mapJavaToKotlin(fqName) ?: return null
|
||||
|
||||
if (howThisTypeIsUsedEffectively == MEMBER_SIGNATURE_COVARIANT || howThisTypeIsUsedEffectively == SUPERTYPE) {
|
||||
if (javaToKotlin.isReadOnlyCollection(kotlinDescriptor)) {
|
||||
if (javaToKotlin.isReadOnly(kotlinDescriptor)) {
|
||||
return javaToKotlin.convertReadOnlyToMutable(kotlinDescriptor)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -182,11 +182,11 @@ public class JavaToKotlinClassMap implements PlatformToKotlinClassMap {
|
||||
return className.isSafe() ? mapPlatformClass(className.toSafe()) : Collections.<ClassDescriptor>emptySet();
|
||||
}
|
||||
|
||||
public boolean isMutableCollection(@NotNull ClassDescriptor mutable) {
|
||||
public boolean isMutable(@NotNull ClassDescriptor mutable) {
|
||||
return mutableToReadOnly.containsKey(mutable);
|
||||
}
|
||||
|
||||
public boolean isReadOnlyCollection(@NotNull ClassDescriptor readOnly) {
|
||||
public boolean isReadOnly(@NotNull ClassDescriptor readOnly) {
|
||||
return readOnlyToMutable.containsKey(readOnly);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user