Skip to content

Commit

Permalink
Configure type for objectreader
Browse files Browse the repository at this point in the history
  • Loading branch information
ihrigb committed Jul 22, 2024
1 parent 5a04261 commit 8eb4d25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHRepositoryRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ T apply(JsonNode jsonNode, GitHub root) throws IOException {
if (jsonNode == null) {
return null;
}
return GitHubClient.getMappingObjectReader(root).readValue(jsonNode);
return GitHubClient.getMappingObjectReader(root).forType(this.getType()).readValue(jsonNode);
}
}

Expand Down
10 changes: 0 additions & 10 deletions src/main/java/org/kohsuke/github/GitHubClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -950,16 +950,6 @@ static String printDate(Date dt) {
return DateTimeFormatter.ISO_INSTANT.format(Instant.ofEpochMilli(dt.getTime()).truncatedTo(ChronoUnit.SECONDS));
}

/**
* Gets an {@link ObjectMapper}.
*
* @return an {@link ObjectMapper} instance
*/
@Nonnull
static ObjectMapper getObjectMapper() {
return MAPPER;
}

/**
* Gets an {@link ObjectWriter}.
*
Expand Down

0 comments on commit 8eb4d25

Please sign in to comment.