You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2021/02/05 10:18:24 UTC

[fineract] branch develop updated: FINERACT-1311: fix nullpointer at savingsAccount closedOnDate

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 022d661  FINERACT-1311: fix nullpointer at savingsAccount closedOnDate
022d661 is described below

commit 022d6618776754d108a41ff701ca113db9608baf
Author: Zoltan Nebli <zo...@dpc.hu>
AuthorDate: Wed Feb 3 14:25:35 2021 +0100

    FINERACT-1311: fix nullpointer at savingsAccount closedOnDate
---
 .../org/apache/fineract/portfolio/savings/domain/SavingsAccount.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
index 7126a16..f70528f 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java
@@ -69,7 +69,6 @@ import javax.persistence.TemporalType;
 import javax.persistence.Transient;
 import javax.persistence.UniqueConstraint;
 import javax.persistence.Version;
-import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.fineract.infrastructure.core.api.JsonCommand;
 import org.apache.fineract.infrastructure.core.data.ApiParameterError;
@@ -2419,7 +2418,7 @@ public class SavingsAccount extends AbstractPersistableCustom {
     }
 
     public LocalDate getClosedOnDate() {
-        return ObjectUtils.defaultIfNull(LocalDate.ofInstant(this.closedOnDate.toInstant(), DateUtils.getDateTimeZoneOfTenant()), null);
+        return this.closedOnDate == null ? null : LocalDate.ofInstant(this.closedOnDate.toInstant(), DateUtils.getDateTimeZoneOfTenant());
     }
 
     public SavingsAccountSummary getSummary() {