Http Trace and Span ID should be StringCachingBigInteger

This commit is contained in:
Anubhaw Arya 2020-04-22 20:07:16 -07:00 committed by GitHub
parent 536ecdbc27
commit 68908c7a52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ package datadog.opentracing.propagation;
import datadog.opentracing.DDSpanContext;
import datadog.opentracing.DDTracer;
import datadog.opentracing.StringCachingBigInteger;
import datadog.trace.api.Config;
import io.opentracing.SpanContext;
import io.opentracing.propagation.TextMapExtract;
@ -117,7 +118,7 @@ public class HttpCodec {
*/
static BigInteger validateUInt64BitsID(final String value, final int radix)
throws IllegalArgumentException {
final BigInteger parsedValue = new BigInteger(value, radix);
final BigInteger parsedValue = new StringCachingBigInteger(value, radix);
if (parsedValue.compareTo(DDTracer.TRACE_ID_MIN) < 0
|| parsedValue.compareTo(DDTracer.TRACE_ID_MAX) > 0) {
throw new IllegalArgumentException(