diff --git a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java index 54f97801a..cd38457fa 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/infrastructure/core/api/JsonCommand.java @@ -199,7 +199,11 @@ public final class JsonCommand { boolean differenceExists = false; if (baseValue != null) { - differenceExists = baseValue.compareTo(workingCopyValue) != 0; + if(workingCopyValue != null) { + differenceExists = baseValue.compareTo(workingCopyValue) != 0; + }else { + differenceExists = true; + } } else { differenceExists = workingCopyValue != null; } diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsProduct.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsProduct.java index a6e8297fd..115e11f5b 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsProduct.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/domain/SavingsProduct.java @@ -353,7 +353,7 @@ public class SavingsProduct extends AbstractPersistable { if (command.isChangeInIntegerParameterNamed(annualFeeOnMonthDayParamName, this.annualFeeOnDay)) { final MonthDay monthDay = command.extractMonthDayNamed(annualFeeOnMonthDayParamName); final String actualValueEntered = command.stringValueOfParameterNamed(annualFeeOnMonthDayParamName); - final Integer newValue = monthDay.getDayOfMonth(); + final Integer newValue = monthDay != null? monthDay.getDayOfMonth(): null; actualChanges.put(annualFeeOnMonthDayParamName, actualValueEntered); actualChanges.put(localeParamName, localeAsInput); this.annualFeeOnDay = newValue; @@ -362,7 +362,7 @@ public class SavingsProduct extends AbstractPersistable { if (command.isChangeInIntegerParameterNamed(annualFeeOnMonthDayParamName, this.annualFeeOnMonth)) { final MonthDay monthDay = command.extractMonthDayNamed(annualFeeOnMonthDayParamName); final String actualValueEntered = command.stringValueOfParameterNamed(annualFeeOnMonthDayParamName); - final Integer newValue = monthDay.getMonthOfYear(); + final Integer newValue = monthDay != null? monthDay.getMonthOfYear(): null; actualChanges.put(annualFeeOnMonthDayParamName, actualValueEntered); actualChanges.put(localeParamName, localeAsInput); this.annualFeeOnMonth = newValue;