Cleanup in modules: j2k, jps, ant and generators.
This commit is contained in:
@@ -40,7 +40,7 @@ class AnnotationConverter(private val converter: Converter) {
|
||||
|
||||
private fun convertAnnotationsOnly(owner: PsiModifierListOwner): Annotations {
|
||||
val modifierList = owner.modifierList
|
||||
val annotations = modifierList?.annotations?.filter { !annotationsToRemove.containsRaw(it.qualifiedName) }
|
||||
val annotations = modifierList?.annotations?.filter { it.qualifiedName !in annotationsToRemove }
|
||||
|
||||
var convertedAnnotations: List<Annotation> = if (annotations != null && annotations.isNotEmpty()) {
|
||||
val newLines = if (!modifierList!!.isInSingleLine()) {
|
||||
|
||||
@@ -367,7 +367,7 @@ class TypeConverter(val converter: Converter) {
|
||||
|
||||
override fun fromType(type: PsiType): Mutability {
|
||||
val target = (type as? PsiClassType)?.resolve() ?: return Mutability.NonMutable
|
||||
if (!TypeVisitor.toKotlinMutableTypesMap.keys.containsRaw(target.qualifiedName)) return Mutability.NonMutable
|
||||
if (target.qualifiedName !in TypeVisitor.toKotlinMutableTypesMap.keys) return Mutability.NonMutable
|
||||
return Mutability.Default
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ class TypeConverter(val converter: Converter) {
|
||||
private fun isMutableFromUsage(usage: PsiExpression): Boolean {
|
||||
val parent = usage.parent
|
||||
if (parent is PsiReferenceExpression && usage == parent.qualifierExpression && parent.parent is PsiMethodCallExpression) {
|
||||
return modificationMethodNames.containsRaw(parent.referenceName)
|
||||
return modificationMethodNames.contains(parent.referenceName as Any?)
|
||||
}
|
||||
else if (parent is PsiExpressionList) {
|
||||
val call = parent.parent as? PsiCall ?: return false
|
||||
|
||||
@@ -188,7 +188,7 @@ private class PropertyDetector(
|
||||
|
||||
dropPropertiesWithConflictingAccessors(memberToPropertyInfo)
|
||||
|
||||
val mappedFields = memberToPropertyInfo.values()
|
||||
val mappedFields = memberToPropertyInfo.values
|
||||
.mapNotNull { it.field }
|
||||
.toSet()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user