Skip to content

Commit 1ce9aa3

Browse files
dariuszkucbrennantaylor
authored andcommitted
simplify directive name selection by removing unnecessary check (#104)
1 parent dfe86bc commit 1ce9aa3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/kotlin/com/expedia/graphql/schema/extensions/directiveExtensions.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ private fun String.normalizeDirectiveName() = CaseFormat.UPPER_CAMEL.to(CaseForm
5454
private data class DirectiveInfo(val directive: Annotation, val directiveAnnotation: GraphQLDirective) {
5555
val effectiveName: String? = when {
5656
directiveAnnotation.name.isNotEmpty() -> directiveAnnotation.name
57-
directive.annotationClass.simpleName.isNullOrBlank().not() -> directive.annotationClass.simpleName?.normalizeDirectiveName()
58-
else -> null
57+
else -> directive.annotationClass.simpleName?.normalizeDirectiveName()
5958
}
6059
}

0 commit comments

Comments
 (0)