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

[#noissue] Fix typo bitField #11297

Merged
merged 1 commit into from
Jul 29, 2024
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 @@ -106,17 +106,16 @@ private void readSpanChunkValue(Buffer buffer, SpanChunkBo spanChunk, SpanDecodi
}

public void readSpanValue(Buffer buffer, SpanBo span, SpanDecodingContext decodingContext) {

final byte version = buffer.readByte();

span.setVersion(version);

final SpanBitField bitFiled = new SpanBitField(buffer.readByte());
final SpanBitField bitField = new SpanBitField(buffer.readByte());

final short serviceType = buffer.readShort();
span.setServiceType(serviceType);

switch (bitFiled.getApplicationServiceTypeEncodingStrategy()) {
switch (bitField.getApplicationServiceTypeEncodingStrategy()) {
case PREV_EQUALS:
span.setApplicationServiceType(serviceType);
break;
Expand All @@ -127,7 +126,7 @@ public void readSpanValue(Buffer buffer, SpanBo span, SpanDecodingContext decodi
throw new IllegalStateException("applicationServiceType");
}

if (!bitFiled.isRoot()) {
if (!bitField.isRoot()) {
span.setParentSpanId(buffer.readLong());
} else {
span.setParentSpanId(-1);
Expand All @@ -144,27 +143,27 @@ public void readSpanValue(Buffer buffer, SpanBo span, SpanDecodingContext decodi
span.setRemoteAddr(buffer.readPrefixedString());
span.setApiId(buffer.readSVInt());

if (bitFiled.isSetErrorCode()) {
if (bitField.isSetErrorCode()) {
span.setErrCode(buffer.readInt());
}
if (bitFiled.isSetHasException()) {
if (bitField.isSetHasException()) {
int exceptionId = buffer.readSVInt();
String exceptionMessage = buffer.readPrefixedString();
span.setExceptionInfo(exceptionId, exceptionMessage);
}

if (bitFiled.isSetFlag()) {
if (bitField.isSetFlag()) {
span.setFlag(buffer.readShort());
}

if (bitFiled.isSetLoggingTransactionInfo()) {
if (bitField.isSetLoggingTransactionInfo()) {
span.setLoggingTransactionInfo(buffer.readByte());
}

span.setAcceptorHost(buffer.readPrefixedString());


if (bitFiled.isSetAnnotation()) {
if (bitField.isSetAnnotation()) {
List<AnnotationBo> annotationBoList = readAnnotationList(buffer, decodingContext);
span.setAnnotationBoList(annotationBoList);
}
Expand Down