Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Native getEvaluation APIs #124

Merged
merged 18 commits into from
May 23, 2024
Merged

feat: Native getEvaluation APIs #124

merged 18 commits into from
May 23, 2024

Conversation

fabriziodemaria
Copy link
Member

@fabriziodemaria fabriziodemaria commented May 20, 2024

Add Confidence-native flag APIs:

public <T> T getValue(String key, T defaultValue);
public <T> FlagEvaluation<T> getEvaluation(String key, T defaultValue);

@fabriziodemaria fabriziodemaria force-pushed the native-resolve branch 2 times, most recently from 9f2060f to 9106ed6 Compare May 20, 2024 15:06
@fabriziodemaria fabriziodemaria marked this pull request as ready for review May 20, 2024 15:07
@fabriziodemaria fabriziodemaria force-pushed the native-resolve branch 3 times, most recently from f382cb3 to 603c78a Compare May 20, 2024 15:50
pom.xml Outdated Show resolved Hide resolved
@fabriziodemaria fabriziodemaria changed the title feat: Native Flag Provider APIs feat: Native getEvaluation APIs May 21, 2024
Comment on lines -425 to +428
value = values.getOrDefault(path[i], NULL_VALUE);
value = values.getOrDefault(path[i], null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What triggered this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the key is not found in the value struct, we should return null: NULL_VALUE is actually an allowed value for any existing key in the value struct (i.e. it indicates to return the default value)

@nicklasl nicklasl merged commit 4ffa37f into main May 23, 2024
3 checks passed
This was referenced May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants