Skip to content

Commit

Permalink
#217 refactor sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorsten Marx committed Jul 1, 2024
1 parent 94c8ac4 commit 2ed8a6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static Map<Object, List<ContentNode>> groupby(final Stream<ContentNode> n
return nodes.collect(Collectors.groupingBy((node) -> MapUtil.getValue(node.data(), field)));
}

protected static QueryContext<?> sorted(final QueryContext<?> context, final String field, final boolean asc) {
protected static <T extends ContentNode> QueryContext<T> sorted(final QueryContext<T> context, final String field, final boolean asc) {

var tempNodes = context.getNodes().sorted(
(node1, node2) -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private static Query toQuery(final String field, final Object value) {
return null;
}

protected static List<?> sorted(final List<?> nodes, final String field, final boolean asc) {
protected static List<? extends ContentNode> sorted(final List<? extends ContentNode> nodes, final String field, final boolean asc) {

var tempNodes = nodes.stream().sorted(
(node1, node2) -> {
Expand Down

0 comments on commit 2ed8a6d

Please sign in to comment.