Some minor cleanups (#627)
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
parent
bcc6202531
commit
c24e4a9636
|
@ -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])
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.annotation.concurrent.Immutable;
|
|||
*/
|
||||
@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.
|
||||
|
|
|
@ -89,7 +89,7 @@ public abstract class EntryMetadata {
|
|||
|
||||
private final int hops;
|
||||
|
||||
private EntryTtl(int hops) {
|
||||
EntryTtl(int hops) {
|
||||
this.hops = hops;
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ public final class Status {
|
|||
|
||||
private final int value;
|
||||
|
||||
private CanonicalCode(int value) {
|
||||
CanonicalCode(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,6 @@ public final class TraceFlags {
|
|||
options = (byte) (options | IS_SAMPLED);
|
||||
} else {
|
||||
options = (byte) (options & ~IS_SAMPLED);
|
||||
;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -131,7 +131,6 @@ public abstract class Tracestate {
|
|||
* @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);
|
||||
|
@ -158,7 +157,6 @@ public abstract class Tracestate {
|
|||
* @return this.
|
||||
* @since 0.1.0
|
||||
*/
|
||||
@SuppressWarnings("nullness")
|
||||
public Builder remove(String key) {
|
||||
Utils.checkNotNull(key, "key");
|
||||
if (entries == null) {
|
||||
|
|
|
@ -146,8 +146,7 @@ public class HttpTraceContext implements HttpTextFormat<SpanContext> {
|
|||
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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,6 @@ import org.junit.runner.RunWith;
|
|||
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";
|
||||
|
|
Loading…
Reference in New Issue