FINERACT-702: Integrate SpotBugs and fix over 300 high priority issues#670
FINERACT-702: Integrate SpotBugs and fix over 300 high priority issues#670awasum wants to merge 11 commits intoapache:developfrom
Conversation
…Violations This PR also serves as a base solution for FINERACT-712 and FINERACT-696 Review thoroughly
|
WOW! Nice.. really nice. Please ping me back here when the build is passing (I haven't even looked at why it's failing), I'd love to review and merge this PR! |
...ract-provider/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyData.java
Outdated
Show resolved
Hide resolved
|
@awasum I was curious why this still failed, so I pulled it locally, and the |
Looks..like the ShareAccount Integration tests are failing(locally) due to some equals or change I made while doing the spotbugs integration...I have not been able to pinpoint the problem further...But I will have a go at it again this evening. Anyone reading this who could help pinpoint the problem before me..that will be great. Last resort, I will revert the changes in the share account module and add one change at a time while run the integration tests till we get it. |
vorburger
left a comment
There was a problem hiding this comment.
@awasum this is amazing work! I've done a detailed review, and have some feedback for you...
Just add additional commits, do you not yet squash, that makes it easier to re-review.
PS: Re. the build problem, with #673 having also failed, I'm now confused whether this PR is causing it, or it's a more general problem; let's see if a trivial #674 passes.
...src/integrationTest/java/org/apache/fineract/integrationtests/ClientLoanIntegrationTest.java
Outdated
Show resolved
Hide resolved
...vider/src/integrationTest/java/org/apache/fineract/integrationtests/common/CenterDomain.java
Show resolved
Hide resolved
...rationTest/java/org/apache/fineract/integrationtests/common/accounting/GLAccountBuilder.java
Show resolved
Hide resolved
fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingConstants.java
Show resolved
Hide resolved
...act-provider/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalance.java
Show resolved
Hide resolved
...t-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeData.java
Outdated
Show resolved
Hide resolved
...rovider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountCharge.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/apache/fineract/portfolio/self/loanaccount/data/SelfLoansDataValidator.java
Show resolved
Hide resolved
fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateMergeService.java
Outdated
Show resolved
Hide resolved
fineract-provider/src/test/java/org/apache/fineract/mix/report/service/XBRLBuilderTest.java
Outdated
Show resolved
Hide resolved
Oh! Silly me, I had not even noticed that (which is why I, confusingly, wrote about Docker above). How about #675 to make this more obvious in the future? Both for stupid myself 😈 and others..
See if any of the review comments I just posted (before reading this) may actually help to fix this?
Yeah, I was thinking of suggesting doing some of the changes proposed here individually, but then didn't want to bother you with extra work. Especially those I picked up on, perhaps easier to get more eyes on them if smaller changes? Up to you. |
…Violations This PR also serves as a base solution for FINERACT-712 and FINERACT-696 Review thoroughly
Merge commit '4524fbf' into spotbugs
bbdf142 to
0468065
Compare
|
@vorburger , If you have some time before xmas, will you like to review this again and merge if Ok? Travis build is now working. |
Maybe, its time I squashed this? |
|
@awasum FYI I haven't forgotten about this, I'm hoping to make time to re-review some time in the coming days! |
| # and Docker test does not run if integration test fails, which makes PR failure easier to understand. | ||
| # @see https://docs.travis-ci.com/user/job-lifecycle/#customizing-the-build-phase | ||
| - ./gradlew --console=plain licenseMain licenseTest licenseIntegrationTest test && ./gradlew --console=plain integrationTest && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 30s && http --verify=no --timeout 240 --check-status get https://localhost:8443/fineract-provider/actuator/health || docker logs fineract_fineract-server_1 | ||
| - ./gradlew --console=plain licenseMain licenseTest licenseIntegrationTest check && ./gradlew --console=plain integrationTest && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 30s && http --verify=no --timeout 240 --check-status get https://localhost:8443/fineract-provider/actuator/health || docker logs fineract_fineract-server_1 |
There was a problem hiding this comment.
Changing gradle test to check is due to https://stackoverflow.com/questions/50104666/gradle-difference-between-test-and-check and looks great here! (Just recording this so that we remember it in the future.)
|
@awasum I'd like to get this in (sorry my delay-...), so I'm going to go about reviewing it differently - I'll pull your branch, squash all of your work into a single commit (with you as the commit's author!), quickly resolve the (trivial) merge conflict caused by #678 myself, and then add one single new commit with changes I would have suggested you make in the final round of review, and then raise a new PR for you to re-review and self-merge - hope that's OK with you? |
Thanks. Go ahead and do it. I have been waiting for this so i can do the other related checkstyle, pmd and other quality checks. |
| // VERIFY THE INTEREST | ||
| Float interestDue = (Float) ((HashMap) loanRepaymnetSchedule.get(2)).get("interestDue"); | ||
| assertEquals(String.valueOf(interestDue), "90.82"); | ||
| assertEquals(String.valueOf(interestDue), "42.38"); |
There was a problem hiding this comment.
As per #682, this, and the other change in line 283 below, doesn't seem right...
|
@awasum if you don't mind I would suggest that we (I'll let you) close this PR, and continue (together) based on #682? (You could of course any time due the same I did and re-fork that branch from me to try to make further changes, it's probably just easier if we go forward from the "cleaner" single squashed rebased one.) |
|
Definitely closing this in favour of #682 (which is now green). |
FINERACT-702: Integrate SpotBugs and fix over 300 high priority rule Violations
This PR also serves as a base solution for FINERACT-712 and FINERACT-696
Review thoroughly
Description
https://issues.apache.org/jira/browse/FINERACT-702
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