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 #371

Merged
merged 2 commits into from
Dec 11, 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 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.2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:nebula-publishing-plugin:14.1.1'
classpath 'com.palantir.baseline:gradle-baseline-java:2.37.0'
classpath 'com.palantir.baseline:gradle-baseline-java:2.42.0'
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.13.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public void close() {
}
}

@SuppressWarnings("UnnecessaryLambda") // this library is allocation sensitive
private static final Function<Trace, CloseableTrace> CLOSEABLE_TRACE_FUNCTION = originalTrace -> () -> {
DefaultCloseableTrace.INSTANCE.close();
Tracer.setTrace(originalTrace);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Enumeration;
import java.util.function.Supplier;
Expand Down Expand Up @@ -67,7 +68,7 @@ public InetAddress get() {
return Inet4Address.getByAddress(new byte[] {0, 0, 0, 0});
}
return jdkSuppliedAddress;
} catch (Exception e) {
} catch (RuntimeException | UnknownHostException | SocketException e) {
try {
return Inet4Address.getByAddress(new byte[] {0, 0, 0, 0});
} catch (UnknownHostException e1) {
Expand Down
5 changes: 1 addition & 4 deletions tracing/src/test/java/com/palantir/tracing/TracersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,7 @@ public void testWrapCallableWithAlternateTraceId_traceStateInsideCallableUsesGiv
String traceIdBeforeConstruction = Tracer.getTraceId();
String traceIdToUse = "someTraceId";
Callable<String> wrappedCallable = Tracers.wrapWithAlternateTraceId(
traceIdToUse,
"operation",
Observability.UNDECIDED,
() -> Tracer.getTraceId());
traceIdToUse, "operation", Observability.UNDECIDED, Tracer::getTraceId);

String traceIdInsideCallable = wrappedCallable.call();

Expand Down