Skip to content

Commit

Permalink
Update HandlebarsEngineAdapter.java
Browse files Browse the repository at this point in the history
The old MY_FIELD_VALUE_RESOLVER.INSTANCE is equivalent to FieldValueResolver.INSTANCE, which is assigned `new FieldValueResolver();` so our custom class was never used.
  • Loading branch information
WouterBaeyens authored Sep 21, 2024
1 parent eebecc8 commit 76d3964
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public TemplateSource sourceAt(String location) {
};

// $ref: https://github.com/jknack/handlebars.java/issues/917
var MY_FIELD_VALUE_RESOLVER = new FieldValueResolver() {
var accessAwareFieldValueResolverInstance = new FieldValueResolver() {
@Override
protected Set<FieldWrapper> members(
Class<?> clazz) {
Expand All @@ -101,7 +101,7 @@ boolean isValidField(
.resolver(
MapValueResolver.INSTANCE,
JavaBeanValueResolver.INSTANCE,
MY_FIELD_VALUE_RESOLVER.INSTANCE,
accessAwareFieldValueResolverInstance,
MethodValueResolver.INSTANCE)
.build();

Expand Down

0 comments on commit 76d3964

Please sign in to comment.