Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Code cleanup (#199)
Browse files Browse the repository at this point in the history
- Propagate @deprecated annotation to implementations
- Remove redundant "static final" definition from interface
- Use Collections.emptyMap instead of Collections.EMPTY_MAP to preserve type
  • Loading branch information
mcumings authored and pavolloffay committed Oct 2, 2017
1 parent f52e7c2 commit e000eb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ public SpanBuilder withStartTimestamp(long microseconds) {
}

@Override
@Deprecated
public MockSpan start() {
return startManual();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.Map;

public interface NoopSpanBuilder extends Tracer.SpanBuilder, NoopSpanContext {
static final NoopSpanBuilder INSTANCE = new NoopSpanBuilderImpl();
NoopSpanBuilder INSTANCE = new NoopSpanBuilderImpl();
}

final class NoopSpanBuilderImpl implements NoopSpanBuilder {
Expand Down Expand Up @@ -67,6 +67,7 @@ public Tracer.SpanBuilder withStartTimestamp(long microseconds) {
}

@Override
@Deprecated
public Span start() {
return startManual();
}
Expand All @@ -83,7 +84,7 @@ public Span startManual() {

@Override
public Iterable<Map.Entry<String, String>> baggageItems() {
return Collections.EMPTY_MAP.entrySet();
return Collections.<String, String>emptyMap().entrySet();
}

@Override
Expand Down

0 comments on commit e000eb0

Please sign in to comment.