updating withdraw fee in saving product(exception) fixed

This commit is contained in:
goutham-M
2013-05-31 19:32:30 +05:30
parent 8ef012826c
commit bc41c58947
2 changed files with 11 additions and 3 deletions
@@ -179,7 +179,11 @@ public final class JsonCommand {
boolean differenceExists = false;
if (baseValue != null) {
differenceExists = !baseValue.equals(workingCopyValue);
if(workingCopyValue != null) {
differenceExists = !baseValue.equals(workingCopyValue);
} else {
differenceExists = true;
}
} else {
differenceExists = workingCopyValue != null;
}
@@ -191,7 +195,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;
}
@@ -340,7 +340,7 @@ public class SavingsProduct extends AbstractPersistable<Long> {
if (command.isChangeInIntegerParameterNamed(withdrawalFeeTypeParamName, this.withdrawalFeeType)) {
final Integer newValue = command.integerValueOfParameterNamed(withdrawalFeeTypeParamName);
actualChanges.put(withdrawalFeeTypeParamName, newValue);
this.withdrawalFeeType = SavingsWithdrawalFeesType.fromInt(newValue).getValue();
this.withdrawalFeeType = newValue != null? SavingsWithdrawalFeesType.fromInt(newValue).getValue(): newValue;
}
if (command.isChangeInBigDecimalParameterNamed(annualFeeAmountParamName, this.annualFeeAmount)) {