cadonna commented on code in PR #17426: URL: https://github.com/apache/kafka/pull/17426#discussion_r1793642071
########## gradle/spotbugs-exclude.xml: ########## @@ -547,5 +547,10 @@ For a detailed description of spotbugs bug categories, see https://spotbugs.read </Or> <Bug pattern="RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT"/> </Match> + <Match> + <!-- Suppress warning about using static DateFormat in a multithreaded context --> + <Class name="org.apache.kafka.tools.ReplicaVerificationTool$ReplicaBuffer"/> + <Bug pattern="STCAL_INVOKE_ON_STATIC_DATE_FORMAT_INSTANCE"/> + </Match> Review Comment: Is this safe? There is a reason for that warning. Why should we suppress it? ########## build.gradle: ########## @@ -309,25 +304,10 @@ subprojects { options.compilerArgs << "-Xlint:-serial" options.compilerArgs << "-Xlint:-try" options.compilerArgs << "-Werror" - - // --release is the recommended way to select the target release, but it's only supported in Java 9 so we also - // set --source and --target via `sourceCompatibility` and `targetCompatibility` a couple of lines below - if (JavaVersion.current().isJava9Compatible()) - options.release = minJavaVersion - // --source/--target 8 is deprecated in Java 20, suppress warning until Java 8 support is dropped in Kafka 4.0 - if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_20)) - options.compilerArgs << "-Xlint:-options" - + options.release = minJavaVersion addParametersForTests(name, options) } - java { - // We should only set this if Java version is < 9 (--release is recommended for >= 9), but the Scala plugin for IntelliJ sets - // `-target` incorrectly if this is unset - sourceCompatibility = minJavaVersion - targetCompatibility = minJavaVersion - } Review Comment: Is this correct? Does the Scala plugin no more suffer from the issue described in the comment? KIP-750 to modify these not to delete them. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
