mirror of https://github.com/grpc/grpc-java.git
errorprone: enable UnnecessaryAnonymousClass (#9927)
The Java 7 compatibility rationale no longer holds.
This commit is contained in:
parent
66f95b7ade
commit
4b6853b6dd
|
|
@ -110,8 +110,6 @@ tasks.withType(JavaCompile).configureEach {
|
||||||
it.options.errorprone.excludedPaths,
|
it.options.errorprone.excludedPaths,
|
||||||
".*/src/generated/.*",
|
".*/src/generated/.*",
|
||||||
"|")
|
"|")
|
||||||
// Reuses source code from grpc-interop-testing, which targets Java 7 (no method references)
|
|
||||||
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
configureProtoCompilation()
|
configureProtoCompilation()
|
||||||
|
|
|
||||||
|
|
@ -90,8 +90,6 @@ tasks.withType(JavaCompile).configureEach {
|
||||||
"-Xlint:-cast"
|
"-Xlint:-cast"
|
||||||
]
|
]
|
||||||
appendToProperty(it.options.errorprone.excludedPaths, ".*/R.java", "|")
|
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) {
|
tasks.register("javadocs", Javadoc) {
|
||||||
|
|
|
||||||
|
|
@ -246,8 +246,6 @@ subprojects {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("compileJava").configure {
|
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)
|
// This project targets Java 7 (no time.Duration class)
|
||||||
options.errorprone.check("PreferJavaTimeOverload", CheckSeverity.OFF)
|
options.errorprone.check("PreferJavaTimeOverload", CheckSeverity.OFF)
|
||||||
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
|
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
|
||||||
|
|
@ -257,7 +255,6 @@ subprojects {
|
||||||
tasks.named("compileTestJava").configure {
|
tasks.named("compileTestJava").configure {
|
||||||
// LinkedList doesn't hurt much in tests and has lots of usages
|
// LinkedList doesn't hurt much in tests and has lots of usages
|
||||||
options.errorprone.check("JdkObsolete", CheckSeverity.OFF)
|
options.errorprone.check("JdkObsolete", CheckSeverity.OFF)
|
||||||
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
|
|
||||||
options.errorprone.check("PreferJavaTimeOverload", CheckSeverity.OFF)
|
options.errorprone.check("PreferJavaTimeOverload", CheckSeverity.OFF)
|
||||||
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
|
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,11 +108,6 @@ plugins.withId("java") {
|
||||||
"<T:Lio/grpc/ServerBuilder<TT;>;>Lio/grpc/ServerBuilder<TT;>;");
|
"<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") {
|
tasks.register("versionFile") {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue