Skip to content

Commit 124534f

Browse files
committed
eliminate compiler warnings by putting back in the <>
IIRC, these were removed to handle the pre-1.0 definition of PageRequest
1 parent 4c3e049 commit 124534f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tooling/metamodel-generator/src/main/java/org/hibernate/processor/annotation/AbstractQueryMethod.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,7 @@ void makeKeyedPage(StringBuilder declaration, List<String> paramTypes) {
439439
"\t\t\t\t\t\t.stream()\n" +
440440
"\t\t\t\t\t\t.map(_key -> Cursor.forKey(_key.toArray()))\n" +
441441
"\t\t\t\t\t\t.collect(toList());\n" +
442-
//SHOULD BE new CursoredPageRecord<>
443-
"\t\treturn new CursoredPageRecord(_results.getResultList(), _cursors, _totalResults, pageRequest,\n" +
442+
"\t\treturn new CursoredPageRecord<>(_results.getResultList(), _cursors, _totalResults, pageRequest,\n" +
444443
"\t\t\t\t_results.isLastPage() ? null : afterCursor(_cursors.get(_cursors.size()-1), pageRequest.page()+1, pageRequest.size(), pageRequest.requestTotal()),\n" +
445444
"\t\t\t\t_results.isFirstPage() ? null : beforeCursor(_cursors.get(0), pageRequest.page()-1, pageRequest.size(), pageRequest.requestTotal()))";
446445

@@ -720,6 +719,7 @@ protected void executeSelect(
720719
declaration
721720
.append("new ")
722721
.append(annotationMetaEntity.importType("jakarta.data.page.impl.PageRecord"))
722+
.append("<>")
723723
.append('(')
724724
.append(parameterName(JD_PAGE_REQUEST, paramTypes, paramNames))
725725
.append(", _results, _totalResults)");

0 commit comments

Comments
 (0)