There was an error while loading. Please reload this page.
IN
1 parent 3a05d8b commit ed5e516Copy full SHA for ed5e516
1 file changed
src/main/java/com/flagsmith/flagengine/segments/SegmentEvaluator.java
@@ -83,6 +83,10 @@ private static Boolean contextMatchesCondition(
83
84
switch (operator) {
85
case IN:
86
+ if (contextValue == null || contextValue instanceof Boolean) {
87
+ return false;
88
+ }
89
+
90
List<String> conditionList = new ArrayList<>();
91
92
if (conditionValue instanceof List) {
@@ -102,11 +106,7 @@ private static Boolean contextMatchesCondition(
102
106
}
103
107
104
108
105
- if (!(contextValue instanceof Boolean) && contextValue != null) {
- contextValue = String.valueOf(contextValue);
- }
-
109
- return conditionList.contains(contextValue);
+ return conditionList.contains(String.valueOf(contextValue));
110
111
case PERCENTAGE_SPLIT:
112
String key;
0 commit comments