xurror commented on pull request #915:
URL: https://github.com/apache/fineract/pull/915#issuecomment-631899383


   I tried forcing the function to be able to accept a null parameter, but that 
just won't do:
   
   `   org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge since 
first historized release unspecified
   In class org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge
   In method 
org.apache.fineract.portfolio.savings.domain.SavingsAccountCharge.percentageOf(BigDecimal,
 BigDecimal)
   Parameter value
   At SavingsAccountCharge.java:[lines 540-548]
   value must be non-null but is marked as nullable
   This parameter is always used in a way that requires it to be non-null, but 
the parameter is explicitly annotated as being Nullable. Either the use of the 
parameter or the annotation is wrong.`
   
   This got me thinking, why would the default value for a decimal be `null` 
instead of zero. It's a glitch that has worked well so far, probably because we 
never stumble on the crash. The method is vouched to fail if a null value is 
passed through.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to