[ https://issues.apache.org/jira/browse/KAFKA-7389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16646503#comment-16646503 ]
ASF GitHub Bot commented on KAFKA-7389: --------------------------------------- ijuma closed pull request #5782: KAFKA-7389: Upgrade spotBugs for Java 11 support (wip) URL: https://github.com/apache/kafka/pull/5782 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/build.gradle b/build.gradle index 95f3eb3eb00..bbc492b9146 100644 --- a/build.gradle +++ b/build.gradle @@ -149,8 +149,7 @@ subprojects { apply plugin: 'maven' apply plugin: 'signing' apply plugin: 'checkstyle' - if (!JavaVersion.current().isJava11Compatible()) - apply plugin: "com.github.spotbugs" + apply plugin: "com.github.spotbugs" sourceCompatibility = minJavaVersion targetCompatibility = minJavaVersion @@ -367,21 +366,18 @@ subprojects { } test.dependsOn('checkstyleMain', 'checkstyleTest') - if (!JavaVersion.current().isJava11Compatible()) { - spotbugs { - // 3.1.6 has a regression that breaks our build, seems to be https://github.com/spotbugs/spotbugs/pull/688 - toolVersion = '3.1.5' - excludeFilter = file("$rootDir/gradle/spotbugs-exclude.xml") - ignoreFailures = false - } - test.dependsOn('spotbugsMain') + spotbugs { + toolVersion = '3.1.7' + excludeFilter = file("$rootDir/gradle/spotbugs-exclude.xml") + ignoreFailures = false + } + test.dependsOn('spotbugsMain') - tasks.withType(com.github.spotbugs.SpotBugsTask) { - reports { - // Continue supporting `xmlFindBugsReport` for compatibility - xml.enabled(project.hasProperty('xmlSpotBugsReport') || project.hasProperty('xmlFindBugsReport')) - html.enabled(!project.hasProperty('xmlSpotBugsReport') && !project.hasProperty('xmlFindBugsReport')) - } + tasks.withType(com.github.spotbugs.SpotBugsTask) { + reports { + // Continue supporting `xmlFindBugsReport` for compatibility + xml.enabled(project.hasProperty('xmlSpotBugsReport') || project.hasProperty('xmlFindBugsReport')) + html.enabled(!project.hasProperty('xmlSpotBugsReport') && !project.hasProperty('xmlFindBugsReport')) } } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Upgrade spotBugs for Java 11 support > ------------------------------------ > > Key: KAFKA-7389 > URL: https://issues.apache.org/jira/browse/KAFKA-7389 > Project: Kafka > Issue Type: Improvement > Reporter: Ismael Juma > Assignee: Ismael Juma > Priority: Major > Fix For: 2.2.0 > > > KAFKA-5887 replaces findBugs with spotBugs adding support for Java 9 and 10. > However, Java 11 is not supported in spotbugs 3.1.5. > Once this is fixed, we also need to update the build to enable spotBugs when > executed with Java 11 and we need to update the relevant Jenkins jobs to > execute spotBugs. -- This message was sent by Atlassian JIRA (v7.6.3#76005)