Skip to content

Commit 5b8bc94

Browse files
committed
Map combiner from DTO instead of hardcoding AND in ParserUtils
Restores original behavior: reads matcherGroup.combiner and maps it to CombiningMatcher.Combiner via valueOf, consistent with how DataType is already mapped across the DTO/domain boundary. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> AI-Session-Id: 588a98fd-ba49-4318-8286-5fb79f9efaca AI-Tool: claude-code AI-Model: unknown
1 parent 0391076 commit 5b8bc94

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

client/src/main/java/io/split/engine/experiments/ParserUtils.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package io.split.engine.experiments;
22

33
import io.split.client.dtos.DataType;
4+
import io.split.client.dtos.MatcherCombiner;
45
import io.split.client.dtos.MatcherType;
56
import io.split.client.dtos.Partition;
67
import io.split.client.dtos.MatcherGroup;
@@ -81,14 +82,18 @@ public static CombiningMatcher toMatcher(MatcherGroup matcherGroup) {
8182
toCombine.add(toMatcher(matcher));
8283
}
8384

84-
return new CombiningMatcher(CombiningMatcher.Combiner.AND, toCombine);
85+
return new CombiningMatcher(toCombiner(matcherGroup.combiner), toCombine);
8586
}
8687

8788

8889
private static io.split.rules.model.DataType toRulesDataType(io.split.client.dtos.DataType dt) {
8990
return io.split.rules.model.DataType.valueOf(dt.name());
9091
}
9192

93+
private static CombiningMatcher.Combiner toCombiner(MatcherCombiner combiner) {
94+
return CombiningMatcher.Combiner.valueOf(combiner.name());
95+
}
96+
9297
public static AttributeMatcher toMatcher(Matcher matcher) {
9398
io.split.rules.matchers.Matcher delegate = null;
9499
switch (matcher.matcherType) {

0 commit comments

Comments
 (0)