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

vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 3bc7914  Update spotbugs to v4.2.0(FINERACT-986)
3bc7914 is described below

commit 3bc7914068e4e7b18323f25e939f629c842e2423
Author: xurror <[email protected]>
AuthorDate: Wed May 20 14:21:17 2020 +0100

    Update spotbugs to v4.2.0(FINERACT-986)
---
 fineract-provider/build.gradle                                        | 3 ++-
 fineract-provider/dependencies.gradle                                 | 4 +++-
 .../fineract/portfolio/savings/domain/SavingsAccountCharge.java       | 4 ++++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle
index 511d707..4361564 100644
--- a/fineract-provider/build.gradle
+++ b/fineract-provider/build.gradle
@@ -44,7 +44,7 @@ buildscript {
         classpath 'org.apache.openjpa:openjpa:3.1.1' // when upgrading, also 
change OpenJPA version repeated below in dependencyManagement!
         classpath 'com.radcortez.gradle:openjpa-gradle-plugin:3.1.0'
         classpath 'gradle.plugin.org.nosphere.apache:creadur-rat-gradle:0.3.1'
-        classpath 
"gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.0.8"
+        classpath 
"gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.2.0"
         classpath 
"gradle.plugin.com.github.andygoossens:gradle-modernizer-plugin:1.3.0"
         classpath 
"gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:2.2.2"
     }
@@ -109,6 +109,7 @@ dependencyManagement {
         dependency 'io.github.classgraph:classgraph:4.8.78'
         dependency 'org.dom4j:dom4j:2.1.0'
         dependency 'org.awaitility:awaitility:4.0.2'
+        dependency 'com.github.spotbugs:spotbugs-annotations:4.0.3'
 
         dependencySet(group: 'com.sun.jersey', version: jerseyVersion) {
             entry 'jersey-core'
diff --git a/fineract-provider/dependencies.gradle 
b/fineract-provider/dependencies.gradle
index 4debce9..28976d1 100644
--- a/fineract-provider/dependencies.gradle
+++ b/fineract-provider/dependencies.gradle
@@ -71,7 +71,9 @@ dependencies {
 
              // JAX-B dependencies for JDK 9+
              "jakarta.xml.bind:jakarta.xml.bind-api",
-             "org.dom4j:dom4j"
+             "org.dom4j:dom4j",
+
+             'com.github.spotbugs:spotbugs-annotations',
     )
     implementation ('io.swagger:swagger-jersey-jaxrs') {
                exclude group: 'javax.validation'
diff --git 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
index 34c838e..068b81c 100644
--- 
a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
+++ 
b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
@@ -25,6 +25,7 @@ import static 
org.apache.fineract.portfolio.savings.SavingsApiConstants.feeInter
 import static 
org.apache.fineract.portfolio.savings.SavingsApiConstants.feeOnMonthDayParamName;
 import static 
org.apache.fineract.portfolio.savings.SavingsApiConstants.localeParamName;
 
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import java.math.BigDecimal;
 import java.math.MathContext;
 import java.util.Date;
@@ -423,6 +424,8 @@ public class SavingsAccountCharge extends 
AbstractPersistableCustom {
         }
     }
 
+
+    @SuppressFBWarnings(value="NP_NULL_PARAM_DEREF_NONVIRTUAL") // 
https://issues.apache.org/jira/browse/FINERACT-987
     public Map<String, Object> update(final JsonCommand command) {
 
         final Map<String, Object> actualChanges = new LinkedHashMap<>(7);
@@ -465,6 +468,7 @@ public class SavingsAccountCharge extends 
AbstractPersistableCustom {
             final BigDecimal newValue = 
command.bigDecimalValueOfParameterNamed(amountParamName);
             actualChanges.put(amountParamName, newValue);
             actualChanges.put(localeParamName, localeAsInput);
+
             switch (ChargeCalculationType.fromInt(this.chargeCalculation)) {
                 case INVALID:
                 break;

Reply via email to