Skip to content

Commit

Permalink
errorprone: enable UnnecessaryAnonymousClass (grpc#9927)
Browse files Browse the repository at this point in the history
The Java 7 compatibility rationale no longer holds.
  • Loading branch information
benjaminp authored Mar 3, 2023
1 parent 66f95b7 commit 4b6853b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions android-interop-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ tasks.withType(JavaCompile).configureEach {
it.options.errorprone.excludedPaths,
".*/src/generated/.*",
"|")
// Reuses source code from grpc-interop-testing, which targets Java 7 (no method references)
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
}

configureProtoCompilation()
2 changes: 0 additions & 2 deletions binder/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ tasks.withType(JavaCompile).configureEach {
"-Xlint:-cast"
]
appendToProperty(it.options.errorprone.excludedPaths, ".*/R.java", "|")
// Reuses source code from grpc-core, which targets Java 7 (no method references)
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
}

tasks.register("javadocs", Javadoc) {
Expand Down
3 changes: 0 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,6 @@ subprojects {
}

tasks.named("compileJava").configure {
// This project targets Java 7 (no method references)
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
// This project targets Java 7 (no time.Duration class)
options.errorprone.check("PreferJavaTimeOverload", CheckSeverity.OFF)
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
Expand All @@ -257,7 +255,6 @@ subprojects {
tasks.named("compileTestJava").configure {
// LinkedList doesn't hurt much in tests and has lots of usages
options.errorprone.check("JdkObsolete", CheckSeverity.OFF)
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
options.errorprone.check("PreferJavaTimeOverload", CheckSeverity.OFF)
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
}
Expand Down
5 changes: 0 additions & 5 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ plugins.withId("java") {
"<T:Lio/grpc/ServerBuilder<TT;>;>Lio/grpc/ServerBuilder<TT;>;");
}
}

tasks.named("compileJmhJava").configure {
// This project targets Java 7 (no method references)
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
}
}

tasks.register("versionFile") {
Expand Down

0 comments on commit 4b6853b

Please sign in to comment.