fix: update ProviderEvaluationBuilder usage for OpenFeature SDK 1.21.0 compatibility#52
Merged
kinyoklion merged 1 commit intoJun 29, 2026
Conversation
… 1.21.0 Co-Authored-By: rlamb@launchdarkly.com <4955475+kinyoklion@users.noreply.github.com>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Member
Author
|
Introduced by open-feature/java-sdk#1901 |
joker23
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements
Related issues
OpenFeature Java SDK 1.21.0 changed
ProviderEvaluationBuilderfrom having 1 type parameter to 3 (adopting Lombok's@SuperBuilderpattern). This causes a compilation failure since the provider declares the builder with an explicit single-parameter type.Describe the solution you've provided
Using
varlets the compiler infer the correct builder type regardless of the OpenFeature SDK version. Thevarkeyword is already used elsewhere in the codebase (e.g.,Provider.java). All 43 existing tests pass with this change against OpenFeature SDK 1.21.0.Describe alternatives you've considered
ProviderEvaluation.ProviderEvaluationBuilder<T, ?, ?>— works but couples the code to the new 3-param signature and wouldn't compile against older SDK versions.Additional context
Versions tested: OpenFeature SDK 1.21.0, LaunchDarkly Java Server SDK 7.14.0. The version constraint
[1.16.0,2.0.0)was already compatible — only the source code needed updating.Link to Devin session: https://app.devin.ai/sessions/4c170c73c83d42e59b487f8b6fd21cc2
Requested by: @kinyoklion
Note
Low Risk
Single-line typing change in evaluation detail conversion; no runtime logic changes.
Overview
Fixes a compile break with OpenFeature Java SDK 1.21.0, where
ProviderEvaluationBuildergained extra type parameters.In
EvaluationDetailConverter.getProviderEvaluation, the local builder is now declared withvarinstead ofProviderEvaluation.ProviderEvaluationBuilder<T>, so the compiler picks the right builder type across SDK versions. Evaluation mapping behavior is unchanged (value, reason, error code, variant).Reviewed by Cursor Bugbot for commit b6a562e. Bugbot is set up for automated code reviews on this repo. Configure here.