You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by ya...@apache.org on 2026/04/09 14:01:54 UTC
(incubator-kie-drools) branch main updated: Fix `spotbug-maven-plugin` usage (#6634)
This is an automated email from the ASF dual-hosted git repository.
yamer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie-drools.git
The following commit(s) were added to refs/heads/main by this push:
new 4c5c40c131 Fix `spotbug-maven-plugin` usage (#6634)
4c5c40c131 is described below
commit 4c5c40c13150e1115de3f06427b61b3587e8bed6
Author: Yeser Amer <ye...@ibm.com>
AuthorDate: Thu Apr 9 16:01:48 2026 +0200
Fix `spotbug-maven-plugin` usage (#6634)
* Fix spotbugs configuration
* Fix detected bug from spotbug
* Minor
---
build-parent/pom.xml | 11 +----------
drools-base/pom.xml | 3 ---
.../drools/base/definitions/impl/KnowledgePackageImpl.java | 2 +-
drools-compiler/pom.xml | 1 -
drools-core/pom.xml | 3 ---
drools-drl/drools-drl-parser/pom.xml | 1 -
6 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/build-parent/pom.xml b/build-parent/pom.xml
index b8cadc0b46..8228ab9920 100644
--- a/build-parent/pom.xml
+++ b/build-parent/pom.xml
@@ -177,8 +177,7 @@
<enforcer.failOnBannedDependencies>true</enforcer.failOnBannedDependencies>
<!-- Set to "true" on every project that has no violations. -->
<spotbugs.failOnViolation>false</spotbugs.failOnViolation>
- <!-- replaces findbugs-maven-plugin -->
- <version.com.github.spotbugs-maven-plugin>3.1.8</version.com.github.spotbugs-maven-plugin>
+ <version.com.github.spotbugs-maven-plugin>4.9.8.3</version.com.github.spotbugs-maven-plugin>
<version.maven.min>3.8.1</version.maven.min>
<!-- property for productisation to know the last released version -->
@@ -1935,19 +1934,11 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${version.com.github.spotbugs-maven-plugin}</version>
- <dependencies>
- <dependency>
- <groupId>org.kie</groupId>
- <artifactId>kie-build-tools</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
<configuration>
<maxRank>6</maxRank>
<effort>Max</effort>
<xmlOutput>true</xmlOutput>
<failOnError>${spotbugs.failOnViolation}</failOnError>
- <excludeFilterFile>spotbugs-excludes.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
diff --git a/drools-base/pom.xml b/drools-base/pom.xml
index 10280ecc30..666943ece6 100644
--- a/drools-base/pom.xml
+++ b/drools-base/pom.xml
@@ -214,9 +214,6 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
- <configuration>
- <excludeFilterFile>${project.basedir}/src/main/spotbugs/spotbugs-exclude.xml</excludeFilterFile>
- </configuration>
</plugin>
</plugins>
diff --git a/drools-base/src/main/java/org/drools/base/definitions/impl/KnowledgePackageImpl.java b/drools-base/src/main/java/org/drools/base/definitions/impl/KnowledgePackageImpl.java
index 3b08b522ea..0e441d6f70 100644
--- a/drools-base/src/main/java/org/drools/base/definitions/impl/KnowledgePackageImpl.java
+++ b/drools-base/src/main/java/org/drools/base/definitions/impl/KnowledgePackageImpl.java
@@ -614,7 +614,7 @@ public class KnowledgePackageImpl
Class<?> typeClass = null;
try {
typeClass = typeDeclaration.getTypeClass();
- if (typeClass != null || !typeClass.isPrimitive()) {
+ if (typeClass != null && !typeClass.isPrimitive()) {
Class<?> cls = getPackageClassLoader().loadClass(typeClass.getName());
typeDeclaration.setTypeClass(cls);
}
diff --git a/drools-compiler/pom.xml b/drools-compiler/pom.xml
index 290f30c1b3..bc945e47f3 100644
--- a/drools-compiler/pom.xml
+++ b/drools-compiler/pom.xml
@@ -185,7 +185,6 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
- <excludeFilterFile>${project.basedir}/src/main/spotbugs/spotbugs-exclude.xml</excludeFilterFile>
<maxHeap>1024</maxHeap> <!-- MB -->
</configuration>
</plugin>
diff --git a/drools-core/pom.xml b/drools-core/pom.xml
index aafcf19b01..a442e01616 100644
--- a/drools-core/pom.xml
+++ b/drools-core/pom.xml
@@ -225,9 +225,6 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
- <configuration>
- <excludeFilterFile>${project.basedir}/src/main/spotbugs/spotbugs-exclude.xml</excludeFilterFile>
- </configuration>
</plugin>
</plugins>
</build>
diff --git a/drools-drl/drools-drl-parser/pom.xml b/drools-drl/drools-drl-parser/pom.xml
index f74f477f4e..ba4c96462b 100644
--- a/drools-drl/drools-drl-parser/pom.xml
+++ b/drools-drl/drools-drl-parser/pom.xml
@@ -105,7 +105,6 @@
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
- <excludeFilterFile>${project.basedir}/src/main/spotbugs/spotbugs-exclude.xml</excludeFilterFile>
<maxHeap>1024</maxHeap> <!-- MB -->
</configuration>
</plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org