Skip to content

Commit a4b354b

Browse files
committed
Add support for non-array property specifications.
1 parent 353f2cf commit a4b354b

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/main/kotlin/org/domaframework/doma/intellij/inspection/dao/processor/option/DaoAnnotationOptionParameterCheckProcessor.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,19 @@ class DaoAnnotationOptionParameterCheckProcessor(
9494
entityClass: PsiClass,
9595
holder: ProblemsHolder,
9696
) {
97-
val arrayValues =
97+
val expression =
9898
annotation.parameterList.attributes
9999
.find { it.name == optionName }
100100
?.value
101-
?.children
102-
?.filter { it is PsiLiteralExpression } ?: return
101+
102+
val arrayValues =
103+
if (expression is PsiLiteralExpression) {
104+
listOf(expression)
105+
} else {
106+
expression
107+
?.children
108+
?.filter { it is PsiLiteralExpression } ?: return
109+
}
103110
if (arrayValues.isEmpty()) return
104111

105112
val project = method.project

0 commit comments

Comments
 (0)