Skip to content

Commit

Permalink
Allow override JacksonJrDecoder#findTransformer
Browse files Browse the repository at this point in the history
  • Loading branch information
yvasyliev committed Jan 20, 2024
1 parent cfcdbd1 commit 580d7d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public class JacksonJrDecoder extends JacksonJrMapper implements Decoder {

@FunctionalInterface
interface Transformer {
protected interface Transformer {
Object apply(JSON mapper, Reader reader) throws IOException;
}

Expand Down Expand Up @@ -92,7 +92,7 @@ public Object decode(Response response, Type type) throws IOException {
}
}

private static Transformer findTransformer(Response response, Type type) {
protected Transformer findTransformer(Response response, Type type) {
if (type instanceof Class) {
return (mapper, reader) -> mapper.beanFrom((Class<?>) type, reader);
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<jvm.options>-Duser.language=en</jvm.options>

<!-- default bytecode version for src/main -->
<main.java.version>1.8</main.java.version>
<main.java.version>17</main.java.version>
<latest.java.version>21</latest.java.version>

<!-- default bytecode version for src/test -->
Expand Down

0 comments on commit 580d7d2

Please sign in to comment.