File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1244,14 +1244,27 @@ else if ( returnArgument
12441244 sessionType ,
12451245 operation ,
12461246 context .addNonnullAnnotation (),
1247- declaredType != parameterType ,
1247+ isIterableLifecycleParameter ( parameterType ) ,
12481248 returnArgument
12491249 )
12501250 );
12511251 }
12521252 }
12531253 }
12541254
1255+ private static boolean isIterableLifecycleParameter (TypeMirror parameterType ) {
1256+ switch (parameterType .getKind ()) {
1257+ case ARRAY :
1258+ return true ;
1259+ case DECLARED :
1260+ final DeclaredType declaredType = (DeclaredType ) parameterType ;
1261+ final TypeElement typeElement = (TypeElement ) declaredType .asElement ();
1262+ return typeElement .getQualifiedName ().contentEquals (LIST );
1263+ default :
1264+ return false ;
1265+ }
1266+ }
1267+
12551268 private static boolean isVoid (TypeMirror returnType ) {
12561269 switch (returnType .getKind ()) {
12571270 case VOID :
You can’t perform that action at this time.
0 commit comments