android-interop-testing: resolve build warnings (#6870)

Suppressed compiler warnings caused by protobug-javalite and errorrprone warnings from grpc-interop-testing + "throw-in-finally".
This commit is contained in:
Chengyuan Zhang 2020-03-27 17:22:58 -07:00 committed by GitHub
parent 2c250ace52
commit 6c5a7df1d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -87,4 +87,14 @@ task checkStyleTest(type: Checkstyle) {
project.tasks['check'].dependsOn checkStyleMain, checkStyleTest
import net.ltgt.gradle.errorprone.CheckSeverity
tasks.withType(JavaCompile) {
options.compilerArgs += [
"-Xlint:-cast"
]
// Reuses source code from grpc-interop-testing, which targets Java 7 (no method references)
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
}
configureProtoCompilation()

View File

@ -53,6 +53,7 @@ final class InteropTask extends AsyncTask<Void, Void, String> {
tester.setUp();
}
@SuppressWarnings("Finally")
@Override
protected String doInBackground(Void... ignored) {
try {