diff --git a/build.gradle b/build.gradle index 29e06d4..c169140 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ plugins { } group 'com.docutools' -version = '1.6.5' +version = '1.6.6' java { toolchain { diff --git a/src/main/java/com/docutools/jocument/impl/ReflectionResolver.java b/src/main/java/com/docutools/jocument/impl/ReflectionResolver.java index 8d84b68..a0062a3 100644 --- a/src/main/java/com/docutools/jocument/impl/ReflectionResolver.java +++ b/src/main/java/com/docutools/jocument/impl/ReflectionResolver.java @@ -394,6 +394,8 @@ private Optional resolveSimplePlaceholder(Object property, Stri } else { return Optional.of(new ScalarPlaceholderData<>(enumProperty)); } + } else if (property instanceof PlaceholderData placeholderData) { + return Optional.of(placeholderData); } else if (isFieldAnnotatedWith(bean.getClass(), placeholderName, Translatable.class)) { return getObjectTranslation(placeholderName, locale, options); } else if (property instanceof Enum || property instanceof String || ReflectionUtils.isWrapperType(property.getClass())) {