Skip to content

Commit

Permalink
[SDKS-7608] Fix null pointer when a feature flag has a set that is no…
Browse files Browse the repository at this point in the history
…t in the storage
  • Loading branch information
nmayorsplit committed Oct 20, 2023
1 parent 0a5605c commit e57d00f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,10 @@ private void removeFromFlagSets(String featureFlagName, HashSet<String> sets) {
if (sets != null) {
for (String set : sets) {
HashSet<String> features = _flagSets.get(set);
features.remove(featureFlagName);
_flagSets.put(set, features);
if (features != null) {
features.remove(featureFlagName);
_flagSets.put(set, features);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public void testSegmentNames() {
}

private ParsedSplit getParsedSplit(String splitName) {
return ParsedSplit.createParsedSplitForTests(splitName, 0, false, "default_treatment", new ArrayList<>(), "tt", 123, 2, new HashSet<>());
return ParsedSplit.createParsedSplitForTests(splitName, 0, false, "default_treatment", new ArrayList<>(), "tt", 123, 2, new HashSet<>(Arrays.asList("set1", "set2", "set3")));
}

@Test
Expand Down

0 comments on commit e57d00f

Please sign in to comment.