Skip to content

Commit

Permalink
Remove two unused internal methods. (#1591)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwatson authored Aug 26, 2020
1 parent 3671d2b commit 1175997
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
15 changes: 0 additions & 15 deletions api/src/main/java/io/opentelemetry/trace/SpanId.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -75,20 +74,6 @@ public static SpanId getInvalid() {
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.
Expand Down
17 changes: 0 additions & 17 deletions api/src/main/java/io/opentelemetry/trace/TraceId.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -79,22 +78,6 @@ public static TraceId getInvalid() {
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.
Expand Down

0 comments on commit 1175997

Please sign in to comment.