Skip to content

Commit ee87bff

Browse files
committed
Merge PR #273: Update noop-api module to follow style guide
2 parents d2808b0 + 2c1d0f9 commit ee87bff

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

noop-api/src/main/java/io/opentelemetry/contrib/noopapi/NoopContextStorageProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* A {@link ContextStorageProvider} that returns a {@link ContextStorage} which is completely no-op.
1717
*/
18-
public class NoopContextStorageProvider implements ContextStorageProvider {
18+
public final class NoopContextStorageProvider implements ContextStorageProvider {
1919

2020
/** Returns a no-op context storage. */
2121
@Override

noop-api/src/main/java/io/opentelemetry/contrib/noopapi/NoopOpenTelemetry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* <p>The above will succeed both with the {@linkplain OpenTelemetry#noop() default implementation}
4343
* and this one, but with this implementation there will be no overhead at all.
4444
*/
45-
public class NoopOpenTelemetry implements OpenTelemetry {
45+
public final class NoopOpenTelemetry implements OpenTelemetry {
4646

4747
private static final OpenTelemetry INSTANCE = new NoopOpenTelemetry();
4848

noop-api/src/test/java/io/opentelemetry/contrib/noopapi/NoopOpenTelemetryTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package io.opentelemetry.contrib.noopapi;
77

8+
import static java.util.concurrent.TimeUnit.DAYS;
89
import static org.assertj.core.api.Assertions.assertThat;
910

1011
import io.opentelemetry.api.common.AttributeKey;
@@ -17,7 +18,6 @@
1718
import io.opentelemetry.api.trace.TraceState;
1819
import io.opentelemetry.context.Context;
1920
import io.opentelemetry.context.Scope;
20-
import java.util.concurrent.TimeUnit;
2121
import org.junit.jupiter.api.Test;
2222

2323
class NoopOpenTelemetryTest {
@@ -61,7 +61,7 @@ void tracerNoOp() {
6161
span1.setAttribute("key", true);
6262
span1.setAttribute(AttributeKey.stringKey("key"), "value");
6363
span1.setSpanKind(SpanKind.CLIENT);
64-
span1.setStartTimestamp(1, TimeUnit.DAYS);
64+
span1.setStartTimestamp(1, DAYS);
6565

6666
// No allocations
6767
assertThat(span1.startSpan()).isSameAs(Span.getInvalid());

0 commit comments

Comments
 (0)