Remove -Xlint:-deprecation from compiler options (#578)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
This commit is contained in:
Bogdan Drutu 2019-09-30 08:54:16 -07:00 committed by GitHub
parent bdf4a6d57c
commit 9b294a6741
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 11 deletions

View File

@ -88,8 +88,6 @@ subprojects {
compileTestJava {
// serialVersionUID is basically guaranteed to be useless in tests
options.compilerArgs += ["-Xlint:-serial"]
// It undeprecates DoubleSubject.isEqualTo(Double).
options.compilerArgs += ["-Xlint:-deprecation"]
}
jar.manifest {

View File

@ -54,7 +54,7 @@ public final class TestUtils {
public static Callable<Integer> finishedSpansSize(final InMemorySpanExporter tracer) {
return new Callable<Integer>() {
@Override
public Integer call() throws Exception {
public Integer call() {
return tracer.getFinishedSpanItems().size();
}
};
@ -67,7 +67,7 @@ public final class TestUtils {
new Condition() {
@Override
public boolean check(Span span) {
AttributeValue attrValue = span.getAttributes().getAttributeMap().get(key);
AttributeValue attrValue = span.getAttributes().getAttributeMapMap().get(key);
if (attrValue == null) {
return false;
}
@ -133,7 +133,7 @@ public final class TestUtils {
}
/** Returns a {@code List} with the {@code Span} matching the specified name. */
public static List<Span> getByName(List<Span> spans, final String name) {
private static List<Span> getByName(List<Span> spans, final String name) {
return getByCondition(
spans,
new Condition() {
@ -163,7 +163,7 @@ public final class TestUtils {
boolean check(Span span);
}
static List<Span> getByCondition(List<Span> spans, Condition cond) {
private static List<Span> getByCondition(List<Span> spans, Condition cond) {
List<Span> found = new ArrayList<>();
for (Span span : spans) {
if (cond.check(span)) {

View File

@ -54,7 +54,7 @@ public final class NestedCallbacksTest {
assertEquals(1, spans.size());
assertEquals("one", spans.get(0).getName());
Map<String, AttributeValue> attrs = spans.get(0).getAttributes().getAttributeMap();
Map<String, AttributeValue> attrs = spans.get(0).getAttributes().getAttributeMapMap();
assertEquals(3, attrs.size());
for (int i = 1; i <= 3; i++) {
assertEquals(Integer.toString(i), attrs.get("key" + i).getStringValue());

View File

@ -52,7 +52,7 @@ public final class TestUtils {
public static Callable<Integer> finishedSpansSize(final InMemorySpanExporter tracer) {
return new Callable<Integer>() {
@Override
public Integer call() throws Exception {
public Integer call() {
return tracer.getFinishedSpanItems().size();
}
};
@ -65,7 +65,7 @@ public final class TestUtils {
new Condition() {
@Override
public boolean check(Span span) {
AttributeValue attrValue = span.getAttributes().getAttributeMap().get(key);
AttributeValue attrValue = span.getAttributes().getAttributeMapMap().get(key);
if (attrValue == null) {
return false;
}
@ -131,7 +131,7 @@ public final class TestUtils {
}
/** Returns a {@code List} with the {@code Span} matching the specified name. */
public static List<Span> getByName(List<Span> spans, final String name) {
private static List<Span> getByName(List<Span> spans, final String name) {
return getByCondition(
spans,
new Condition() {
@ -161,7 +161,7 @@ public final class TestUtils {
boolean check(Span span);
}
static List<Span> getByCondition(List<Span> spans, Condition cond) {
private static List<Span> getByCondition(List<Span> spans, Condition cond) {
List<Span> found = new ArrayList<>();
for (Span span : spans) {
if (cond.check(span)) {