This is an automated email from the ASF dual-hosted git repository.

centic9 pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git

commit 32c3b60725f6f29f099720ecec4f59ef9dc4e75a
Author: Dominik Stadler <[email protected]>
AuthorDate: Sat Aug 15 12:53:02 2026 +0200

    Ant: Disable spotbugs/findbugs with JDK 27
    
    Newer JDKs often cannot run spotbugs/findbugs
    due to missing updates of the asm third party
    library.
    
    Therefore let's disable spotbugs on those
    versions.
    
    It can also manually be disabled by specifying
    -Dspotbugs.disable=1 when invoking ant
---
 build.xml | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/build.xml b/build.xml
index 6dcebbaab4..0cc669c585 100644
--- a/build.xml
+++ b/build.xml
@@ -68,6 +68,13 @@ under the License.
         <contains string="${java.vendor}" substring="IBM" 
casesensitive="false"/>
     </condition>
 
+    <!-- Some JDK versions are not fully supported yet
+    adjust the check here when newer JDKs are supported by newer
+    versions of spotbugs -->
+    <condition property="spotbugs.disable">
+        <equals arg1="${ant.java.version}" arg2="27"/>
+    </condition>
+
     <!-- issue warnings if source code contains unmappable characters for 
encoding ASCII  -->
     <property name="java.source.encoding" value="UTF-8"/>
 
@@ -2550,10 +2557,19 @@ under the License.
         </forbiddenapis>
     </target>
 
+    <target name="-findbugs-check">
+        <condition property="findbugs.notRequired">
+            <or>
+                <isset property="isIBMVM"/>
+                <isset property="spotbugs.disable"/>
+            </or>
+        </condition>
+    </target>
+
     <!-- disabling findbugs until jenkins is updated to a current IBM JDK
          see https://stackoverflow.com/a/48561534/2066598
          this should be replaced by spotbugs when available in the jenkins 
warnings plugin -->
-    <target name="findbugs" depends="jar" unless="${isIBMVM}">
+    <target name="findbugs" depends="-findbugs-check,jar" 
unless="findbugs.notRequired">
         <property name="spotbugs.home" value="build/findbugs" />
         <property name="spotbugs.lib" value="/build/findbugs/lib" />
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to