fix another bug in detecting when a repo method param is multivalued
Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
d99309db52
commit
dcfc254635
|
@ -1244,7 +1244,7 @@ public class AnnotationMetaEntity extends AnnotationMeta {
|
|||
sessionType,
|
||||
operation,
|
||||
context.addNonnullAnnotation(),
|
||||
declaredType != parameterType,
|
||||
isIterableLifecycleParameter(parameterType),
|
||||
returnArgument
|
||||
)
|
||||
);
|
||||
|
@ -1252,6 +1252,19 @@ public class AnnotationMetaEntity extends AnnotationMeta {
|
|||
}
|
||||
}
|
||||
|
||||
private static boolean isIterableLifecycleParameter(TypeMirror parameterType) {
|
||||
switch (parameterType.getKind()) {
|
||||
case ARRAY:
|
||||
return true;
|
||||
case DECLARED:
|
||||
final DeclaredType declaredType = (DeclaredType) parameterType;
|
||||
final TypeElement typeElement = (TypeElement) declaredType.asElement();
|
||||
return typeElement.getQualifiedName().contentEquals(LIST);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isVoid(TypeMirror returnType) {
|
||||
switch (returnType.getKind()) {
|
||||
case VOID:
|
||||
|
|
Loading…
Reference in New Issue