Skip to content

Commit fabf787

Browse files
chillaqsanzmauro
andauthored
Update client/src/main/java/io/split/client/HttpSplitChangeFetcher.java
Co-authored-by: Mauro Sanz <[email protected]>
1 parent 682ba45 commit fabf787

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

client/src/main/java/io/split/client/HttpSplitChangeFetcher.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,11 @@ public SplitChange fetch(long since, long sinceRBS, FetchOptions options) {
106106
_telemetryRuntimeProducer.recordSyncLatency(HTTPLatenciesEnum.SPLITS, System.currentTimeMillis() - start);
107107
}
108108

109-
SplitChange splitChange = new SplitChange();
110109
if (SPEC_VERSION.equals(Spec.SPEC_1_1)) {
111-
splitChange.featureFlags = convertBodyToOldSpec(response.body());
112-
splitChange.ruleBasedSegments = createEmptyDTO();
113-
} else {
114-
splitChange = Json.fromJson(response.body(), SplitChange.class);
110+
return Json.fromJson(body, SplitChangesOldPayloadDto.class).toSplitChange();
115111
}
116-
return splitChange;
112+
113+
return Json.fromJson(response.body(), SplitChange.class);
117114
}
118115

119116
public Long getLastProxyCheckTimestamp() {

0 commit comments

Comments
 (0)