File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/main/java/com/flagsmith/flagengine/segments Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ private static Boolean contextMatchesCondition(
8383
8484 switch (operator ) {
8585 case IN :
86+ if (contextValue == null || contextValue instanceof Boolean ) {
87+ return false ;
88+ }
89+
8690 List <String > conditionList = new ArrayList <>();
8791
8892 if (conditionValue instanceof List ) {
@@ -102,11 +106,7 @@ private static Boolean contextMatchesCondition(
102106 }
103107 }
104108
105- if (!(contextValue instanceof Boolean ) && contextValue != null ) {
106- contextValue = String .valueOf (contextValue );
107- }
108-
109- return conditionList .contains (contextValue );
109+ return conditionList .contains (String .valueOf (contextValue ));
110110
111111 case PERCENTAGE_SPLIT :
112112 String key ;
You can’t perform that action at this time.
0 commit comments