FINERACT-839: NPE when creating a Loan for a client fix#696
FINERACT-839: NPE when creating a Loan for a client fix#696awasum merged 1 commit intoapache:developfrom adamsaghy:bugfix/loanproductdata
Conversation
|
Make sure this passes Spotbugs checks on your local machine. Lets wait for Travis to build. |
|
On your local machine, run ./gradlew clean check build and make sure checkstyle and spotbugs rules are not voilated. |
|
Then squash your commits into one when done. |
|
The problem is the SpotBug is a little bit too restrictive: 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. |
|
What is wron with instead of returning Null we instead do |
|
From business perspective it is different to return FALSE or NULL. I reckon there was a consideration to choose Boolean as object to make it able to return NULL. A warning would be better. |
Ok...In your PR..Suppress spotbugs for the methods having the error..Just above it, place the statement: |
|
Have u functionally tested this and the problem has gone away? @adamsaghy . I dont have the right environment to test. If everything is fine on your end..let me know to merge this since every spotbugs and checkstyle test is also passing. Thanks for your patience. |
|
I did a quick test as now I was able to open a Loan to the client but havent checked all the iteration. |
Please...check everything and let us know if this is Ok to be merged. |
|
As it worked for 3 years before the spotbugs commit, and we just reverted back to the original behaviour, in my opinion it is safe to merge. ;) |
|
Send more PRs as you identify bugs. Thanks |
That's what I would have suggested as well... have commented in FINERACT-839. @adamsaghy are you motivated to raise a follow-up PR for that? |
Description
Describe the changes made and why they were made. Ignore if these details are present on the associated Jira ticket
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Commit message starts with the issue number from https://issues.apache.org/jira/projects/FINERACT/. Ex: FINERACT-646 Pockets API.
Coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions have been followed.
API documentation at https://github.com/apache/fineract/blob/develop/api-docs/apiLive.htm has been updated with details of any API changes.
Integration tests have been created/updated for verifying the changes made.
All Integrations tests are passing with the new commits.
Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the list.)
Our guidelines for code reviews is at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide