Some minor cleanups (#627)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
Bogdan Drutu 2019-10-23 19:48:40 -07:00 committed by GitHub
parent bcc6202531
commit c24e4a9636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 12 deletions

View File

@ -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])

View File

@ -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.

View File

@ -89,7 +89,7 @@ public abstract class EntryMetadata {
private final int hops;
private EntryTtl(int hops) {
EntryTtl(int hops) {
this.hops = hops;
}

View File

@ -203,7 +203,7 @@ public final class Status {
private final int value;
private CanonicalCode(int value) {
CanonicalCode(int value) {
this.value = value;
}

View File

@ -232,7 +232,6 @@ public final class TraceFlags {
options = (byte) (options | IS_SAMPLED);
} else {
options = (byte) (options & ~IS_SAMPLED);
;
}
return this;
}

View File

@ -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) {

View File

@ -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) {

View File

@ -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
}
}

View File

@ -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
}
}

View File

@ -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";