remove unnecessary code, fixing bug in generated imports

for Jakarta Data TCK work

Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
Gavin King 2024-04-04 10:50:15 +02:00
parent bcae77fb32
commit e748619dd6
1 changed files with 1 additions and 7 deletions

View File

@ -132,7 +132,7 @@ public abstract class AbstractQueryMethod extends AbstractAnnotatedMethod {
notNull( declaration );
}
declaration
.append(annotationMetaEntity.importType(importReturnTypeArgument(paramType)))
.append(annotationMetaEntity.importType(paramType))
.append(" ")
.append(paramNames.get(i).replace('.', '$'));
}
@ -144,12 +144,6 @@ public abstract class AbstractQueryMethod extends AbstractAnnotatedMethod {
return SESSION_TYPES.contains(paramType);
}
private String importReturnTypeArgument(String type) {
return returnTypeName != null
? type.replace(returnTypeName, annotationMetaEntity.importType(returnTypeName))
: type;
}
void sessionParameter(StringBuilder declaration) {
if ( !belongsToDao && paramTypes.stream().noneMatch(SESSION_TYPES::contains) ) {
notNull(declaration);