Skip to content

Commit

Permalink
Update opentelementry-proto to 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jhalliday committed Nov 26, 2024
1 parent 408b4e9 commit 03b8c2d
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -215,26 +215,6 @@ public static int sizeRepeatedInt64(ProtoFieldInfo field, List<Long> values) {
return field.getTagSize() + CodedOutputStream.computeUInt32SizeNoTag(payloadSize) + payloadSize;
}

/**
* Returns the size of a repeated int32 field.
*
* <p>Packed repeated fields contain the tag, an integer representing the incoming payload size,
* and an actual payload of repeated varints.
*/
public static int sizeRepeatedInt32(ProtoFieldInfo field, int[] values) {
if (values.length == 0) {
return 0;
}

int payloadSize = 0;
for (int v : values) {
payloadSize += CodedOutputStream.computeInt32SizeNoTag(v);
}

// tag size + payload indicator size + actual payload size
return field.getTagSize() + CodedOutputStream.computeUInt32SizeNoTag(payloadSize) + payloadSize;
}

/**
* Returns the size of a repeated int32 field.
*
Expand Down

0 comments on commit 03b8c2d

Please sign in to comment.