Skip to content

Commit 69f3976

Browse files
committed
chore: Update javadoc and parameter name
Signed-off-by: Ryan Prayogo <[email protected]>
1 parent ce27c39 commit 69f3976

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/main/java/dev/openfeature/sdk/providers/memory/InMemoryProvider.java

+11-7
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public InMemoryProvider(Map<String, Flag<?>> flags) {
4848
}
4949

5050
/**
51-
* Initialize the provider.
51+
* Initializes the provider.
5252
* @param evaluationContext evaluation context
5353
* @throws Exception on error
5454
*/
@@ -60,8 +60,10 @@ public void initialize(EvaluationContext evaluationContext) throws Exception {
6060
}
6161

6262
/**
63-
* Updating provider flags configuration, replacing existing flags.
64-
* @param newFlags the flags to use instead of the previous flags.
63+
* Updates the provider flags configuration.
64+
* For existing flags, the new configurations replace the old one.
65+
* For new flags, they are added to the configuration.
66+
* @param newFlags the new flag configurations
6567
*/
6668
public void updateFlags(Map<String, Flag<?>> newFlags) {
6769
Set<String> flagsChanged = new HashSet<>(newFlags.keySet());
@@ -76,11 +78,13 @@ public void updateFlags(Map<String, Flag<?>> newFlags) {
7678
}
7779

7880
/**
79-
* Updating provider flags configuration with adding or updating a flag.
80-
* @param flag the flag to update. If a flag with this key already exists, new flag replaces it.
81+
* Updates a single provider flag configuration.
82+
* For existing flag, the new configuration replaces the old one.
83+
* For new flag, they are added to the configuration.
84+
* @param newFlag the flag to update
8185
*/
82-
public void updateFlag(String flagKey, Flag<?> flag) {
83-
this.flags.put(flagKey, flag);
86+
public void updateFlag(String flagKey, Flag<?> newFlag) {
87+
this.flags.put(flagKey, newFlag);
8488
ProviderEventDetails details = ProviderEventDetails.builder()
8589
.flagsChanged(Collections.singletonList(flagKey))
8690
.message("flag added/updated")

0 commit comments

Comments
 (0)