[
https://issues.apache.org/jira/browse/HADOOP-19725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18035442#comment-18035442
]
ASF GitHub Bot commented on HADOOP-19725:
-----------------------------------------
slfan1989 commented on code in PR #8028:
URL: https://github.com/apache/hadoop/pull/8028#discussion_r2492132718
##########
pom.xml:
##########
@@ -119,8 +119,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
https://maven.apache.org/x
<maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
<checkstyle.version>8.29</checkstyle.version>
<dependency-check-maven.version>7.1.1</dependency-check-maven.version>
- <spotbugs.version>4.2.2</spotbugs.version>
- <spotbugs-maven-plugin.version>4.2.0</spotbugs-maven-plugin.version>
+ <spotbugs.version>4.8.3</spotbugs.version>
Review Comment:
Thank you all for the discussion! I believe what @szetszwo mentioned makes
sense.
Let me explain the situation:
We have upgraded the JDK version in the `trunk` to `JDK 17` and `JDK 21`.
Regarding the issue of `mvn site` failing to compile, this is a known issue and
is unrelated to the `SpotBugs` plugin.
Here’s a detailed explanation of the two issues:
1. The reason for upgrading is that `SpotBugs 4.2.0`, as indicated by
`Yetus`, does not support scanning for JDK 17 and above. Therefore, we upgraded
to a higher version, choosing `SpotBugs 4.9.7.` From my perspective, upgrading
to `SpotBugs 4.9.7` is reasonable. Although new warning messages have appeared,
I do not plan to roll back the version.
Issue after upgrading to `SpotBugs 4.9.7`: Due to the introduction of new
rules, new warning messages appeared during compilation. We have formulated a
solution:
- Temporary solution: We are filtering out these new warnings globally to
mitigate the impact of the new filtering rules. You can refer to the related PR
#8053.
2. mvn site compilation failure: This issue is related to our custom
annotations, which we can see in the error logs.
We already have a solution for this:
Referring to PR #8038. we have rewritten all the annotations under
`hadoop-common-project/hadoop-annotations/src/main/java17/org/apache/hadoop/classification/tools/*`
and added support for JDIFF under JDK 17.
Currently, these two PRs are being followed up by HuaLong. In offline
communication, HuaLong mentioned that he is currently on leave, so it may take
some more time to complete.
I hope this makes the situation clearer!
> Upgrade SpotBugs Version to Support JDK 17 Compilation
> ------------------------------------------------------
>
> Key: HADOOP-19725
> URL: https://issues.apache.org/jira/browse/HADOOP-19725
> Project: Hadoop Common
> Issue Type: Improvement
> Components: build, hadoop-common
> Affects Versions: 3.5.0
> Reporter: Shilun Fan
> Assignee: Shilun Fan
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.5.0
>
>
> The current SpotBugs version used in the project is 4.2.2 (SpotBugs) and
> 4.2.0 (SpotBugs Maven Plugin), which is not fully compatible with JDK 17
> compilation. To ensure proper functionality of the code quality check tool in
> a JDK 17 environment, SpotBugs needs to be upgraded to the latest version
> that supports JDK 17.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]