amaechler commented on code in PR #19528:
URL: https://github.com/apache/druid/pull/19528#discussion_r3319989912
##########
server/src/main/java/org/apache/druid/server/DruidNode.java:
##########
@@ -130,12 +131,12 @@ public DruidNode(
*/
@JsonCreator
public DruidNode(
- @JacksonInject @Named("serviceName") @JsonProperty("service") String
serviceName,
+ @JacksonInject(useInput = OptBoolean.TRUE) @Named("serviceName")
@JsonProperty("service") String serviceName,
Review Comment:
The static observation is correct: `findInjectableValue` calls
`JacksonInject.Value.forId(id)`, which strips `useInput` from the Value. In the
current setup the [`AnnotationIntrospectorPair.findInjectableValue`
fallback](https://github.com/FasterXML/jackson-databind/blob/jackson-databind-2.21.3/src/main/java/com/fasterxml/jackson/databind/introspect/AnnotationIntrospectorPair.java#L289-L300)
recovers the missing flag from the secondary (Jackson default) introspector,
so visible runtime behavior is correct.
Instead of relying on that fallback though, I pushed a follow-up commit that
preserves `useInput` and `optional` directly via
`JacksonInject.Value.from(annotation).withId(id)`, removing the reliance.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]