New api: Make Clock class package-private since it is an implementation detail
MODIFY
dd-trace/src/main/java/datadog/trace/tracer/Clock.java
dd-trace/src/main/java/datadog/trace/tracer/Clock.java
@@ -17,7 +17,7 @@ import lombok.EqualsAndHashCode;
* nanosecond precision.
*/
@EqualsAndHashCode
-public class Clock {
+class Clock {
/** Tracer that created this clock */
private final Tracer tracer;
@@ -27,7 +27,7 @@ public class Clock {
/** Nano ticks counter when clock is created */
private final long startNanoTicks;
- public Clock(final Tracer tracer) {
+ Clock(final Tracer tracer) {
this.tracer = tracer;
startTimeNano = epochTimeNano();
startNanoTicks = nanoTicks();

MODIFY
dd-trace/src/main/java/datadog/trace/tracer/ContinuationImpl.java
dd-trace/src/main/java/datadog/trace/tracer/ContinuationImpl.java
@@ -43,7 +43,9 @@ class ContinuationImpl implements Continuation {
protected synchronized void finalize() {
try {
if (!closed) {
- log.debug("Closing continuation due to GC, this will prevent trace from being reported: {}", this);
+ log.debug(
+ "Closing continuation due to GC, this will prevent trace from being reported: {}",
+ this);
closeContinuation(true);
}
} catch (final Throwable t) {

MODIFY
dd-trace/src/main/java/datadog/trace/tracer/SpanImpl.java
dd-trace/src/main/java/datadog/trace/tracer/SpanImpl.java
@@ -280,7 +280,8 @@ class SpanImpl implements Span {
// instance is 'revived' from the dead by passing reference to some other object and
// then dies again.
if (!isFinished()) {
- log.debug("Finishing span due to GC, this will prevent trace from being reported: {}", this);
+ log.debug(
+ "Finishing span due to GC, this will prevent trace from being reported: {}", this);
finishSpan(startTimestamp.getDuration(), true);
}
} catch (final Throwable t) {

MODIFY
dd-trace/src/main/java/datadog/trace/tracer/Timestamp.java
dd-trace/src/main/java/datadog/trace/tracer/Timestamp.java
@@ -27,7 +27,7 @@ public class Timestamp {
}
/** @return clock instance used by this timestamp */
- public Clock getClock() {
+ Clock getClock() {
return clock;
}

New api: Make Clock class package-private since it is an implementation detail