use SpotBugs & fix over 300 high priority rule violations (FINERACT-702)

This PR also serves as a base solution for upcoming FINERACT-712 and
FINERACT-696.  It includes using Objects.equals() to prevent NPEs, and
adding gradle check to run SpotBugs on Travis CI.

PS: SpotBugs is the successor to (and same code as) FindBugs.
This commit is contained in:
Awasum Yannick
2020-01-12 13:16:42 +01:00
committed by Michael Vorburger ⛑️
parent 75f7c5947d
commit af0dd7e5f3
145 changed files with 1273 additions and 1191 deletions
+1 -1
View File
@@ -61,6 +61,6 @@ script:
# using "&&" instead of several "-" means that integrationTest does not run if test fails,
# 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
# We stop the mysql system service when running the Docker test to avoid port 3306 conflicts (unless we run the mysql in docker-compose on another port; req. FINERACT-773)
# The || docker logs lets use see the root cause in case of failures