Function name fixed in AnnotationConverter

This commit is contained in:
Mikhail Glukhikh
2015-07-29 11:37:16 +03:00
parent b657713f1c
commit 00eaec766d
2 changed files with 2 additions and 2 deletions
@@ -32,7 +32,7 @@ class AnnotationConverter(private val converter: Converter) {
+ NullableNotNullManager.getInstance(converter.project).getNullables()
+ listOf(CommonClassNames.JAVA_LANG_OVERRIDE, javaClass<ElementType>().name)).toSet()
public fun isImportRequired(annotationName: String): Boolean {
public fun isImportNotRequired(annotationName: String): Boolean {
return annotationName in annotationsToRemove || annotationName == javaClass<Target>().name
}
@@ -65,7 +65,7 @@ public fun Converter.convertImport(anImport: PsiImportStatementBase, filter: Boo
}
private fun Converter.filterImport(name: String, ref: PsiJavaCodeReferenceElement): String? {
if (annotationConverter.isImportRequired(name)) return null
if (annotationConverter.isImportNotRequired(name)) return null
// If imported class has a kotlin analog, drop the import
if (!JavaToKotlinClassMap.INSTANCE.mapPlatformClass(FqName(name)).isEmpty()) return null