Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excavator: Upgrades Baseline to the latest version #294

Merged
merged 3 commits into from
Oct 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
<module name="NestedTryDepth"/> <!-- Java Coding Guide: Try/catch blocks: never nested -->
<module name="NonEmptyAtclauseDescription"/> <!-- Java Style Guide: At-clauses -->
<module name="ParameterName"> <!-- Java Style Guide: Parameter names -->
<property name="format" value="^[a-z][a-zA-Z0-9]+$"/>
<property name="format" value="^_?[a-z][a-zA-Z0-9]+$"/>
<message key="name.invalidPattern" value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc"/> <!-- Java Style Guide: General form -->
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ buildscript {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:nebula-publishing-plugin:13.6.1'
classpath 'com.palantir.baseline:gradle-baseline-java:2.8.1'
classpath 'com.palantir.baseline:gradle-baseline-java:2.10.1'
classpath 'com.palantir.gradle.gitversion:gradle-git-version:0.12.2'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.1.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:1.12.4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private static Runnable wrapWithSpan(String operation, Runnable next) {
};
}

public static void main(String[] unused) throws Exception {
public static void main(String[] _args) throws Exception {
Options opt = new OptionsBuilder()
.include(TracingBenchmark.class.getSimpleName())
.addProfiler(GCProfiler.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void async_future() throws InterruptedException {

Futures.addCallback(future, new FutureCallback<Object>() {
@Override
public void onSuccess(Object unused) {
public void onSuccess(Object _value) {
assertThat(Tracer.hasTraceId()).isFalse();
try (CloseableSpan tracer = span.completeAndStartChild("success" + i)) {
assertThat(Tracer.getTraceId()).isEqualTo(traceId);
Expand All @@ -90,7 +90,7 @@ public void onSuccess(Object unused) {
}

@Override
public void onFailure(Throwable unused) {
public void onFailure(Throwable _throwable) {
Assertions.fail();
}
}, executorService);
Expand Down Expand Up @@ -209,12 +209,12 @@ void transformed_future() throws InterruptedException {
}, executor)
.addCallback(new FutureCallback<Object>() {
@Override
public void onSuccess(Object unused) {
public void onSuccess(Object _value) {
foo.complete();
}

@Override
public void onFailure(Throwable unused) {
public void onFailure(Throwable _throwable) {
foo.complete();
}
}, executor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void testFilter_setsMdcIfTraceIdHeaderIsNotePresent() throws Exception {

public static class TracingTestServer extends Application<Configuration> {
@Override
public final void run(Configuration unused, final Environment env) throws Exception {
public final void run(Configuration _value, final Environment env) throws Exception {
env.jersey().register(new TraceEnrichingFilter());
env.jersey().register(new TracingTestResource());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class LeakedTraceFilter implements Filter {
private static final Logger log = LoggerFactory.getLogger(LeakedTraceFilter.class);

@Override
public void init(FilterConfig unused) {
public void init(FilterConfig _value) {
// nop
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ public void testFilter_aroundLeakyOperation() {

public static class TracingTestServer extends Application<Configuration> {
@Override
public final void run(Configuration unusedConfig, final Environment env) {
public final void run(Configuration _config, final Environment env) {
env.servlets().addFilter("previousRequestLeaked", new Filter() {
@Override
public void init(FilterConfig unused) { }
public void init(FilterConfig _value) { }

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
Expand All @@ -115,7 +115,7 @@ public void destroy() { }
// Register a filter to help us orchestrate test cases
env.servlets().addFilter("testFilter", new Filter() {
@Override
public void init(FilterConfig unused) {}
public void init(FilterConfig _value) {}

@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
Expand All @@ -139,15 +139,15 @@ public void destroy() {}

env.servlets().addServlet("alwaysLeaks", new HttpServlet() {
@Override
protected void service(HttpServletRequest unused, HttpServletResponse resp) {
protected void service(HttpServletRequest _value, HttpServletResponse resp) {
Tracer.fastStartSpan("leaky");
resp.addHeader("Leaky-Invoked", "true");
}
}).addMapping("/leaky");

env.servlets().addServlet("reportingServlet", new HttpServlet() {
@Override
protected void service(HttpServletRequest unused, HttpServletResponse resp) {
protected void service(HttpServletRequest _value, HttpServletResponse resp) {
resp.addHeader("Servlet-Has-Trace", Boolean.toString(Tracer.hasTraceId()));
}
}).addMapping("/standard", "/previous-request-leaked");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void handles_trace_with_multiple_root_spans() throws InterruptedException {
@ParameterizedTest(name = "foo {index} bar {arguments}")
@ValueSource(ints = {1, 2, 3})
@TestTracing(snapshot = true)
void handles_trace_with_single_root_span(int unused) throws InterruptedException {
void handles_trace_with_single_root_span(int _value) throws InterruptedException {
prod_code();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public final void consume(final Span span) {

Futures.addCallback(future, new FutureCallback<Span>() {
@Override
public void onSuccess(Span unused) {
public void onSuccess(Span _value) {
numInflights.decrementAndGet();
}

Expand Down
4 changes: 2 additions & 2 deletions tracing/src/main/java/com/palantir/tracing/Trace.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,12 @@ private Unsampled(String traceId) {
}

@Override
void fastStartSpan(String unusedOperation, String parentSpanId, SpanType unusedType) {
void fastStartSpan(String _operation, String parentSpanId, SpanType _type) {
startSpan(Optional.of(parentSpanId));
}

@Override
void fastStartSpan(String unusedOperation, SpanType unusedType) {
void fastStartSpan(String _operation, SpanType _type) {
numberOfSpans++;
}

Expand Down
2 changes: 1 addition & 1 deletion tracing/src/main/java/com/palantir/tracing/Tracer.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public CloseableSpan childSpan(String operationName, SpanType type) {
}

@Override
public DetachedSpan childDetachedSpan(String unusedOperation, SpanType unusedType) {
public DetachedSpan childDetachedSpan(String _operation, SpanType _type) {
return this;
}

Expand Down