Skip to content

Commit

Permalink
Polish JacksonModulesRuntimeHints
Browse files Browse the repository at this point in the history
  • Loading branch information
sdeleuze committed Aug 23, 2022
1 parent 8a6c1ba commit 2f920e8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
}

private void registerType(ReflectionHints reflectionHints, String className, ClassLoader classLoader) {
if (ClassUtils.isPresent(className, classLoader)) {
reflectionHints.registerType(TypeReference.of(className),
builder -> builder.onReachableType(TypeReference.of(Jackson2ObjectMapperBuilder.class))
.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
}
reflectionHints.registerTypeIfPresent(classLoader, className,
builder -> builder.onReachableType(TypeReference.of(Jackson2ObjectMapperBuilder.class))
.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
}
}

0 comments on commit 2f920e8

Please sign in to comment.