Bug
ReferenceableAuthenticationPolicyBuilder.build() and RetryBackoffBuilder.build() call all setters unconditionally. Since each setter assigns this.value = param, the last call (with null) overwrites the previously set value.
// ReferenceableAuthenticationPolicyBuilder.build()
policy.setAuthenticationPolicy(this.authenticationPolicy); // sets value = authenticationPolicy ✓
policy.setAuthenticationPolicyReference(this.authenticationPolicyReference); // sets value = null ✗
This causes OneOfValueProvider.get() to return null, so SerializeHelper.serializeOneOf writes authentication: null in the serialized output — even though the authentication is correctly configured and works at runtime.
Same pattern in BaseTryTaskBuilder.RetryBackoffBuilder.build() with three setters.
Impact
Breaks YAML/JSON rendering in DevUI and editor validation for any workflow using inline authentication (OAuth2, Basic, Bearer, Digest, OIDC on endpoints).
Tracked in: quarkiverse/quarkus-flow#781
Fix
Add null guards, matching the pattern BasicAuthenticationPolicyBuilder, BearerAuthenticationPolicyBuilder, and DigestAuthenticationPolicyBuilder already use:
public ReferenceableAuthenticationPolicy build() {
final ReferenceableAuthenticationPolicy policy = new ReferenceableAuthenticationPolicy();
if (this.authenticationPolicyReference != null) {
policy.setAuthenticationPolicyReference(this.authenticationPolicyReference);
} else {
policy.setAuthenticationPolicy(this.authenticationPolicy);
}
return policy;
}
Bug
ReferenceableAuthenticationPolicyBuilder.build()andRetryBackoffBuilder.build()call all setters unconditionally. Since each setter assignsthis.value = param, the last call (withnull) overwrites the previously set value.This causes
OneOfValueProvider.get()to returnnull, soSerializeHelper.serializeOneOfwritesauthentication: nullin the serialized output — even though the authentication is correctly configured and works at runtime.Same pattern in
BaseTryTaskBuilder.RetryBackoffBuilder.build()with three setters.Impact
Breaks YAML/JSON rendering in DevUI and editor validation for any workflow using inline authentication (OAuth2, Basic, Bearer, Digest, OIDC on endpoints).
Tracked in: quarkiverse/quarkus-flow#781
Fix
Add null guards, matching the pattern
BasicAuthenticationPolicyBuilder,BearerAuthenticationPolicyBuilder, andDigestAuthenticationPolicyBuilderalready use: