Skip to content

Commit

Permalink
Improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisGabin committed Feb 21, 2022
1 parent 550fb86 commit 9638d52
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -51,7 +51,7 @@ class AnnotationExcluder(

private fun isExcluded(annotation: KtTypeReference, context: BindingContext): Boolean {
val fqName = if (context == BindingContext.EMPTY) null else annotation.fqNameOrNull(context)
return if (fqName == null) {
val possibleNames = if (fqName == null) {
fullQualifiedNameGuesser.getFullQualifiedName(annotation.text.toString())
.map { it.getPackage() to it }
} else {
Expand All @@ -64,7 +64,8 @@ class AnnotationExcluder(
.scan("") { acc, name -> if (acc.isEmpty()) name else "$name.$acc" }
.drop(1) + fqName
}
.any { name -> name in excludes }

return possibleNames.any { name -> name in excludes }
}
}

Expand Down

0 comments on commit 9638d52

Please sign in to comment.