updating annual fee amount in savings product(exception) fixed

This commit is contained in:
goutham-M
2013-05-31 15:56:29 +01:00
committed by Keith Woodlock
parent b373458f57
commit 7478e17f3c
2 changed files with 7 additions and 3 deletions
@@ -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;
}
@@ -353,7 +353,7 @@ public class SavingsProduct extends AbstractPersistable<Long> {
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<Long> {
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;