Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version (#294)
Browse files Browse the repository at this point in the history
* Excavator: Upgrades Baseline to the latest version

* ./gradlew classes testClasses -PerrorProneApply

* One more fix
  • Loading branch information
svc-excavator-bot authored and iamdanfox committed Oct 3, 2019
1 parent 051780d commit 3046707
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 19 deletions.
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

0 comments on commit 3046707

Please sign in to comment.