File tree 1 file changed +14
-1
lines changed
tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation
1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1244,14 +1244,27 @@ else if ( returnArgument
1244
1244
sessionType ,
1245
1245
operation ,
1246
1246
context .addNonnullAnnotation (),
1247
- declaredType != parameterType ,
1247
+ isIterableLifecycleParameter ( parameterType ) ,
1248
1248
returnArgument
1249
1249
)
1250
1250
);
1251
1251
}
1252
1252
}
1253
1253
}
1254
1254
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
+
1255
1268
private static boolean isVoid (TypeMirror returnType ) {
1256
1269
switch (returnType .getKind ()) {
1257
1270
case VOID :
You can’t perform that action at this time.
0 commit comments