awasum commented on issue #696: FINERACT-839: NPE when creating a Loan for a 
client fix
URL: https://github.com/apache/fineract/pull/696#issuecomment-577646366
 
 
   > The problem is the SpotBug is a little bit too restrictive:
   > Bad practice Warnings
   > Code Warning
   > NP 
org.apache.fineract.portfolio.loanproduct.data.LoanProductData.isCompoundingToBePostedAsTransaction()
 has Boolean return type and returns explicit null
   > Details
   > NP_BOOLEAN_RETURN_NULL: Method with Boolean return type returns explicit 
null
   > A method that returns either Boolean.TRUE, Boolean.FALSE or null is an 
accident waiting to happen. This method can be invoked as though it returned a 
value of type boolean, and the compiler will insert automatic unboxing of the 
Boolean value. If a null value is returned, this will result in a 
NullPointerException.
   > 
   > Before the spotBug the business logic required to return null...as it is a 
valid option from business perspective.
   > 
   > Do you have any advice?
   
   Maybe we add a spotbugs exception to omit checks of this type..Or just for 
this case in the code base.
   
   @vorburger  some help please.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to