Skip to content

Commit c22003e

Browse files
committed
fix rbs toString
1 parent b739b97 commit c22003e

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

client/src/main/java/io/split/client/dtos/RuleBasedSegment.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.split.client.dtos;
22

3+
import java.util.ArrayList;
34
import java.util.List;
45

56
public class RuleBasedSegment {
@@ -16,7 +17,21 @@ public String toString() {
1617
"name='" + name + '\'' +
1718
", status=" + status +
1819
", trafficTypeName='" + trafficTypeName + '\'' +
19-
", changeNumber=" + changeNumber +
20+
", changeNumber=" + changeNumber + '\'' +
21+
excludedToString() + '\'' +
2022
'}';
2123
}
24+
25+
public String excludedToString() {
26+
Excluded ts = excluded != null ? excluded : new Excluded();
27+
if (ts.keys == null) {
28+
ts.keys = new ArrayList<>();
29+
}
30+
31+
if (ts.segments == null) {
32+
ts.segments = new ArrayList<>();
33+
}
34+
35+
return ", excludedKeys=" + ts.keys + '\'' + ", excludedSegments=" + ts.segments;
36+
}
2237
}

0 commit comments

Comments
 (0)