typat commented on code in PR #4442:
URL: https://github.com/apache/logging-log4j2/pull/4442#discussion_r4594608127
##########
log4j-core-test/src/test/resources/GraalVmProcessorTest/java/FakePlugin.java:
##########
@@ -70,6 +71,12 @@ public static class Builder implements
org.apache.logging.log4j.core.util.Builde
@SuppressWarnings("log4j.public.setter")
private int attributeWithoutPublicSetterButWithSuppressAnnotation;
+ @PluginAttribute("attributeField")
+ private String attributeField;
+
+ @Required
+ private String requiredOnly;
Review Comment:
Added in ab756f7. The builder now has `notBlankOnly`, `validHostOnly` and
`validPortOnly`, each with only the constraint annotation, and the expected
field list and folder hash are updated (`19e2ae8c`).
I also checked it the way you described. With the three entries taken out of
`Annotations`, or out of `GraalVmProcessor`, `GraalVmProcessorTest` now fails
on the missing fields.
##########
src/changelog/.2.x.x/4441_fix_graalvm_plugin_builder_fields.xml:
##########
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<entry xmlns="https://logging.apache.org/xml/ns"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ https://logging.apache.org/xml/ns
+ https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
+ type="fixed">
+ <issue id="4441"
link="https://github.com/apache/logging-log4j2/issues/4441"/>
+ <issue id="4442" link="https://github.com/apache/logging-log4j2/pull/4442"/>
+ <description format="asciidoc">
+ Fix plugin builders that fail in GraalVM native images, because some of
their fields have no reflection metadata.
Review Comment:
Done in ab756f7, I used your wording.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]