Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Commit

Permalink
Address build warnings (#455)
Browse files Browse the repository at this point in the history
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
  • Loading branch information
jpkrohling authored and pavolloffay committed Jun 18, 2018
1 parent 4f1c0b9 commit 8b87ab7
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ subprojects {
}

dependencies {
annotationProcessor 'org.projectlombok:lombok:1.16.18'
compileOnly 'org.projectlombok:lombok:1.16.18'
compileOnly 'org.codehaus.mojo:animal-sniffer-annotations:1.16'
}
Expand Down
4 changes: 2 additions & 2 deletions jaeger-core/src/main/java/io/jaegertracing/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ public static CodecConfiguration fromEnv() {
addCodec(codecs, Format.Builtin.TEXT_MAP, new TextMapCodec(false));
break;
case B3:
addCodec(codecs, Format.Builtin.HTTP_HEADERS, new B3TextMapCodec());
addCodec(codecs, Format.Builtin.TEXT_MAP, new B3TextMapCodec());
addCodec(codecs, Format.Builtin.HTTP_HEADERS, new B3TextMapCodec.Builder().build());
addCodec(codecs, Format.Builtin.TEXT_MAP, new B3TextMapCodec.Builder().build());
break;
default:
log.error("Unhandled propagation format '" + format + "'");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,9 @@ public void testDefaultCodecs() {
assertInjectExtract(configuration.getTracer(), Builtin.HTTP_HEADERS, spanContext, false);
}

@SuppressWarnings("unchecked")
private <C> void assertInjectExtract(io.opentracing.Tracer tracer, Format<C> format, SpanContext contextToInject,
boolean injectMapIsEmpty) {
boolean injectMapIsEmpty) {
HashMap<String, String> injectMap = new HashMap<>();
tracer.inject(contextToInject, format, (C)new TextMapInjectAdapter(injectMap));
assertEquals(injectMapIsEmpty, injectMap.isEmpty());
Expand Down
2 changes: 1 addition & 1 deletion jaeger-core/src/test/java/io/jaegertracing/TracerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@RunWith(DataProviderRunner.class)
public class B3TextMapCodecResiliencyTest {

private B3TextMapCodec sut = new B3TextMapCodec();
private B3TextMapCodec sut = new B3TextMapCodec.Builder().build();

@DataProvider
public static Object[][] maliciousInputs() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
public class B3TextMapCodecTest {
static final byte SAMPLED = 1;

B3TextMapCodec b3Codec = new B3TextMapCodec();
B3TextMapCodec b3Codec = new B3TextMapCodec.Builder().build();

@Test
public void downgrades128BitTraceIdToLower64Bits() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.junit.Test;
import zipkin.junit.ZipkinRule;
import zipkin2.codec.Encoding;
import zipkin2.reporter.AsyncReporter;
import zipkin2.reporter.Sender;
import zipkin2.reporter.urlconnection.URLConnectionSender;

Expand All @@ -36,7 +37,7 @@ public class ZipkinV2ReporterTest {
@Rule public ZipkinRule zipkinRule = new ZipkinRule();

Sender sender;
zipkin2.reporter.AsyncReporter zipkinReporter;
AsyncReporter<zipkin2.Span> zipkinReporter;
Reporter reporter;
Tracer tracer;

Expand Down

0 comments on commit 8b87ab7

Please sign in to comment.