Remove two unused internal methods. (#1591)
This commit is contained in:
parent
3671d2b84d
commit
1175997dd1
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue