Skip to content

Commit 688ca56

Browse files
committed
clean up
1 parent 71c7dbc commit 688ca56

3 files changed

Lines changed: 5 additions & 20 deletions

File tree

src/main/kotlin/io/openapiprocessor/intellij/MicronautAnnotation.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ class MicronautAnnotation(
2828
return false
2929

3030
val value = psi.findAttributeValue("uri")
31-
if (value !is PsiLiteralExpression)
32-
return false
33-
34-
return true
31+
return value is PsiLiteralExpression
3532
}
3633

3734
override fun matches(psi: PsiAnnotation, path: String): Boolean {
@@ -43,9 +40,6 @@ class MicronautAnnotation(
4340
return false
4441

4542
val uri = PsiLiteralUtil.getStringLiteralContent(value)
46-
if (uri != path)
47-
return false
48-
49-
return true
43+
return uri == path
5044
}
5145
}

src/main/kotlin/io/openapiprocessor/intellij/SpringAnnotation.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ class SpringAnnotation(override val name: String, override val method: String):
2525
return false
2626

2727
val value = psi.findAttributeValue("path")
28-
if (value !is PsiLiteralExpression)
29-
return false
30-
31-
return true
28+
return value is PsiLiteralExpression
3229
}
3330

3431
override fun matches(psi: PsiAnnotation, path: String): Boolean {
@@ -40,9 +37,6 @@ class SpringAnnotation(override val name: String, override val method: String):
4037
return false
4138

4239
val uri = PsiLiteralUtil.getStringLiteralContent(value)
43-
if (uri != path)
44-
return false
45-
46-
return true
40+
return uri == path
4741
}
4842
}

src/main/kotlin/io/openapiprocessor/intellij/SpringRequestAnnotation.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ class SpringRequestAnnotation(override val method: String): Annotation {
4242
return false
4343

4444
val uri = PsiLiteralUtil.getStringLiteralContent(value)
45-
if (uri != path)
46-
return false
47-
48-
return true
45+
return uri == path
4946
}
5047
}

0 commit comments

Comments
 (0)