mansi75 commented on PR #5813:
URL: https://github.com/apache/fineract/pull/5813#issuecomment-4359007593
@adamsaghy Thank you for the correction. After checking the actual Loan.java
source:
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "product_id", nullable = false)
private LoanProduct loanProduct;
loanProduct IS lazily loaded but it cannot be null in practice since
nullable = false and DelinquencyReadPlatformServiceImpl is annotated
@Transactional, so it is open for entire method call. So I agree there is no
real-world scenario where getLoanProduct() returns null and I have not noticed
NPE anywhere. I will revert the unnecessary null guards and keep only the
single operator fix.
Sorry for the confusion
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]