Skip to content

Commit

Permalink
Fix method return type
Browse files Browse the repository at this point in the history
  • Loading branch information
uwburn committed Mar 22, 2022
1 parent 125950d commit b7eefd5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<groupId>it.mgt.util</groupId>
<artifactId>jpa-json-search</artifactId>
<version>1.2.6</version>
<version>1.2.7</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public int getPages() {
return (int) Math.round(Math.ceil(count.doubleValue() / pageSize));
}

public <V> List<V> transform(JpaJsonSearchResultTransformer<T> transformer) {
return transformer.transform(values);
public <V> JpaJsonSearchResult<V> transform(JpaJsonSearchResultTransformer<T, V> transformer) {
return new JpaJsonSearchResult<>(transformer.transform(values), count, page, pageSize);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.util.List;

public interface JpaJsonSearchResultTransformer<T> {
public interface JpaJsonSearchResultTransformer<T, V> {

<V> List<V> transform(List<T> result);
List<V> transform(List<T> result);

}

0 comments on commit b7eefd5

Please sign in to comment.