Skip to content

Commit

Permalink
Some minor cleanups (#627)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored Oct 24, 2019
1 parent bcc6202 commit c24e4a9
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ javadoc {
})
for (subproject in subprojects_javadoc) {
if (subproject == project) {
continue;
continue
}
source subproject.javadoc.source
options.links subproject.javadoc.options.links.toArray(new String[0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
@Immutable
public class EmptyDistributedContext implements DistributedContext {
private static final Collection<Entry> EMPTY_COLLECTION = Collections.<Entry>emptyList();
private static final Collection<Entry> EMPTY_COLLECTION = Collections.emptyList();

/**
* Returns the single instance of the {@link EmptyDistributedContext} class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public enum EntryTtl {

private final int hops;

private EntryTtl(int hops) {
EntryTtl(int hops) {
this.hops = hops;
}

Expand Down
2 changes: 1 addition & 1 deletion api/src/main/java/io/opentelemetry/trace/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public enum CanonicalCode {

private final int value;

private CanonicalCode(int value) {
CanonicalCode(int value) {
this.value = value;
}

Expand Down
1 change: 0 additions & 1 deletion api/src/main/java/io/opentelemetry/trace/TraceFlags.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ public Builder setIsSampled(boolean isSampled) {
options = (byte) (options | IS_SAMPLED);
} else {
options = (byte) (options & ~IS_SAMPLED);
;
}
return this;
}
Expand Down
2 changes: 0 additions & 2 deletions api/src/main/java/io/opentelemetry/trace/Tracestate.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ private Builder(Tracestate parent) {
* @return this.
* @since 0.1.0
*/
@SuppressWarnings("nullness")
public Builder set(String key, String value) {
// Initially create the Entry to validate input.
Entry entry = Entry.create(key, value);
Expand All @@ -158,7 +157,6 @@ public Builder set(String key, String value) {
* @return this.
* @since 0.1.0
*/
@SuppressWarnings("nullness")
public Builder remove(String key) {
Utils.checkNotNull(key, "key");
if (entries == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ public <C> void inject(SpanContext spanContext, C carrier, Setter<C> setter) {
String listMember = listMembers[i];
int index = listMember.indexOf(TRACESTATE_KEY_VALUE_DELIMITER);
checkArgument(index != -1, "Invalid tracestate list-member format.");
tracestateBuilder.set(
listMember.substring(0, index), listMember.substring(index + 1, listMember.length()));
tracestateBuilder.set(listMember.substring(0, index), listMember.substring(index + 1));
}
return SpanContext.create(traceId, spanId, traceFlags, tracestateBuilder.build());
} catch (IllegalArgumentException e) {
Expand Down
2 changes: 1 addition & 1 deletion exporters/jaeger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protobuf {
// generated Java directories as source folders.
idea {
module {
sourceDirs += file("build/generated/source/proto/main/java");
sourceDirs += file("build/generated/source/proto/main/java")
// If you have additional sourceSets and/or codegen plugins, add all of them
}
}
2 changes: 1 addition & 1 deletion proto/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protobuf {
// generated Java directories as source folders.
idea {
module {
sourceDirs += file("build/generated/source/proto/main/java");
sourceDirs += file("build/generated/source/proto/main/java")
// If you have additional sourceSets and/or codegen plugins, add all of them
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import org.junit.runners.JUnit4;

/** Unit tests for {@link SpanBuilderSdk}. */
@SuppressWarnings("deprecation")
@RunWith(JUnit4.class)
public class SpanBuilderSdkTest {
private static final String SPAN_NAME = "span_name";
Expand Down

0 comments on commit c24e4a9

Please sign in to comment.