Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix BuildSpanAction deserialization logic #425

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ public ConverterV1() {
@Override
public void marshal(BuildSpanAction action, HierarchicalStreamWriter writer, MarshallingContext context) {
writeField("spanContext", action.buildSpanContext, writer, context);
writeField("version", action.version.get(), writer, context);
if (action.buildUrl != null) {
writeField("buildUrl", action.buildUrl, writer, context);
}
Expand All @@ -106,8 +105,6 @@ public void marshal(BuildSpanAction action, HierarchicalStreamWriter writer, Mar
@Override
public BuildSpanAction unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
TraceSpan.TraceSpanContext spanContext = readField(reader, context, TraceSpan.TraceSpanContext.class);
int version = readField(reader, context, int.class);

String buildUrl = null;
while (reader.hasMoreChildren()) {
reader.moveDown();
Expand All @@ -118,7 +115,7 @@ public BuildSpanAction unmarshal(HierarchicalStreamReader reader, UnmarshallingC
reader.moveUp();
}

return new BuildSpanAction(spanContext, null, version, buildUrl);
return new BuildSpanAction(spanContext, null, 0, buildUrl);
}
}

Expand Down
Loading