I’m trying to multiply two bigdecimal values. If i leave this “BigDecimal exchangeRate = BigDecimal.ZERO;”, i get a null pointer exception. If i place it in my code the result of the multiplication is “0”. If i change is to Bigdecimal.TEN, the result is the value multuplied by ten. How do i get it to use the value of the field " exchangeRate"?

As result i want “exchangeRate” multiplied with “e.getValue”, that doesn’t happen. So if e.g. amount1Field is 100 and exchangeRate is 19, amount2Field should be 1900.

if " BigDecimal exchangeRate = BigDecimal.ZERO;" is in the code the result is “0” . If i change it to “BigDecimal exchangeRate = BigDecimal.TEN;” the result is “1000”.