Skip to content

Commit 8eaf34e

Browse files
committed
In the primitive type check, display the previous property’s type correctly in the error message.
1 parent 5db76d3 commit 8eaf34e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class DaoAnnotationOptionParameterCheckProcessor(
109109
arrayValues.map { fields ->
110110
val valueFields = fields.text.replace("\"", "").split(".")
111111
var searchParamType: PsiType = entityClass.psiClassType
112+
var prevFieldVal = valueFields.first()
112113
var searchParamClass: PsiClass? = project.getJavaClazz(searchParamType)
113114

114115
valueFields.forEachIndexed { _, field ->
@@ -122,12 +123,13 @@ class DaoAnnotationOptionParameterCheckProcessor(
122123
fields,
123124
shortName,
124125
fields.text.replace("\"", ""),
125-
field,
126+
prevFieldVal,
126127
optionName,
127128
).highlightElement(holder)
128129
return@map
129130
} else {
130131
if (currentField != null) {
132+
prevFieldVal = currentField.nameIdentifier.text
131133
searchParamType = currentField.type
132134
searchParamClass = project.getJavaClazz(searchParamType)
133135
} else {

0 commit comments

Comments
 (0)