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
38a41e0044
commit
c7852feb55
|
@ -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