fix: 修复质量插件在 Java 21 下不可用,并修复 SpotBugs 发现的空指针风险

- checkstyle: 升级至 3.6.0,新增 checkstyle.xml 基础规则,绑定 verify 阶段
- findbugs: 替换为 spotbugs-maven-plugin 4.8.6.6(FindBugs 已停止维护且无法解析 Java 21 字节码),
  绑定 verify 阶段,新增 spotbugs-exclude.xml 排除遗留命名等检查
- javadoc: 升级至 3.12.0(3.12.1 在中央仓库不存在),禁用 doclint
- 修复 SpotBugs 发现的问题:压缩/解压方法中 getFileName()/getParent() 可能为 null 的防御,
  共享 SecureRandom 实例避免重复创建
This commit is contained in:
database-mysql committed 2026-11-02 09:56:28 +08:00
1 parent 28eaccf35f
commit 6c843c4030
5 files changed
+115 -11

No files matched your search

+33 -5
View File
@@ -68,25 +68,53 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
<version>3.6.0</version>
<configuration>
<configLocation>checkstyle.xml</configLocation>
<encoding>UTF-8</encoding>
<failOnViolation>true</failOnViolation>
</configuration>
<executions>
<execution>
<id>checkstyle-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>3.0.5</version>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.6.6</version>
<configuration>
<effort>Max</effort>
<threshold>Medium</threshold>
<failOnError>true</failOnError>
<xmlOutput>true</xmlOutput>
<excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile>
</configuration>
<executions>
<execution>
<id>spotbugs-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<version>3.12.0</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
<doclint>none</doclint>
</configuration>
</plugin>