We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c4d35e2 commit 0e827fcCopy full SHA for 0e827fc
src/main/java/com/flagsmith/flagengine/segments/SegmentEvaluator.java
@@ -110,13 +110,15 @@ private static Boolean contextMatchesCondition(
110
return conditionList.contains(contextValue);
111
112
case PERCENTAGE_SPLIT:
113
- String key = (contextValue != null) ? contextValue.toString()
114
- : (context.getIdentity() != null) ? context.getIdentity().getKey() : null;
115
-
116
- if (key == null) {
117
- return false;
+ String key;
+ if (contextValue == null) {
+ if (context.getIdentity() == null) {
+ return false;
+ }
118
+ key = context.getIdentity().getKey();
119
+ } else {
120
+ key = contextValue.toString();
121
}
122
List<String> objectIds = List.of(segmentKey, key);
123
124
final float floatValue;
0 commit comments