Remove two unused internal methods. (#1591)

This commit is contained in:
John Watson 2020-08-25 21:06:31 -07:00 committed by GitHub
parent 3671d2b84d
commit 1175997dd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 32 deletions

View File

@ -17,7 +17,6 @@
package io.opentelemetry.trace;
import io.opentelemetry.internal.Utils;
import java.util.Random;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
@ -75,20 +74,6 @@ public final class SpanId implements Comparable<SpanId> {
return INVALID;
}
/**
* Generates a new random {@code SpanId}.
*
* @param random The random number generator.
* @return a valid new {@code SpanId}.
*/
static SpanId generateRandomId(Random random) {
long id;
do {
id = random.nextLong();
} while (id == INVALID_ID);
return new SpanId(id);
}
/**
* Returns a {@code SpanId} whose representation is copied from the {@code src} beginning at the
* {@code srcOffset} offset.

View File

@ -17,7 +17,6 @@
package io.opentelemetry.trace;
import io.opentelemetry.internal.Utils;
import java.util.Random;
import javax.annotation.Nullable;
import javax.annotation.concurrent.Immutable;
@ -79,22 +78,6 @@ public final class TraceId implements Comparable<TraceId> {
return INVALID;
}
/**
* Generates a new random {@code TraceId}.
*
* @param random the random number generator.
* @return a new valid {@code TraceId}.
*/
static TraceId generateRandomId(Random random) {
long idHi;
long idLo;
do {
idHi = random.nextLong();
idLo = random.nextLong();
} while (idHi == INVALID_ID && idLo == INVALID_ID);
return new TraceId(idHi, idLo);
}
/**
* Returns a {@code TraceId} whose representation is copied from the {@code src} beginning at the
* {@code srcOffset} offset.