Use Hikari instead of Tomcat Connection Pool
- Created hikari connection pool bean
- Configured connection parameters to match hikari
- Removed tomcat-jdbc and dbcp
- Remove unused classes
- Add Hikari to logback
- update hikaridatasource bean
closes https://issues.apache.org/jira/browse/FINERACT-796
remove hikaricp import from gradle files
more specific bean config
- Set up datasource properties
- Cleanup unused classes
- Add hikari to logback
As per the great analysis by Manthan Surkar (@thesmallstar) in the
original PR https://github.com/apache/fineract/pull/723, the cause of
the FINERACT-808 bug was that "the backend would treat "UPDATE" and
similar strings as SQL injection".
The root cause of that was that (IMHO..) how Fineract does SQL injection
is more of a workaround (blacklisting some keywords and some heuristic
checks) then how this really should be done (by using JDBC Prepared
statements with arguments for all external data, instead inlined SQL).
This also lays the foundation for more like this in FINERACT-854.
* Minor manually done fix up of fineractdev-eclipse-preferences.epf file
This in theory should not change anything about the conventions,
it's just a first manual clean up of this very old file here.
The few extra new lines are what I found when exporting Preferences.
Related to https://issues.apache.org/jira/browse/FINERACT-821
* fineractdev-eclipse-preferences.epf imported and re-exported in Eclipse.
This in theory should not change anything about the conventions, as
presumably Eclipse during an Import and re-Export of an EPF just adds
new settings, and perhaps removes old settings. I've not actually made
any manual changes in Preferences in this step.
Related to https://issues.apache.org/jira/browse/FINERACT-821
* fineractdev-eclipse-preferences.epf "import" in line with Checkstyle
The non-import related Code Formatter settings may need further tuning;
this will be done in future changes; the focus in this round is on
import.
Related to https://issues.apache.org/jira/browse/FINERACT-821
* Use Eclipse's Source > Organize Import to re-order all import statements
This uses the fineractdev-eclipse-preferences.epf from the previous
commit, which just so happens ;) to exactly match the expected import
rules which the next commit is going to enforce using Checkstyle.
This is of course not specific to only Eclipse per se; other IDEs can
be similarly configured to match these coding conventions; I just happen
to have used Eclipse.
Related to https://issues.apache.org/jira/browse/FINERACT-821
* Activate and Enforce all Checkstyle import related new checks
and update the README to explain Checkstyle, and the availability of the
Eclipse Preferences configuration file which matches the import
code format conventions which are now enforced.
Contributions for a similar preferences file for other IDEs welcome! ;)
Related to https://issues.apache.org/jira/browse/FINERACT-821
based upon code review of changes made by @awasum in previous commit:
- fix clear contains() GC_UNRELATED_TYPES bug in Loan
- fix clear equals() EC_UNRELATED_TYPES bug in Loan
- fix more equals() & hashCode() in...
* Charge
* TrialBalance
* LoanProductBorrowerCycleVariations
* LoanProductProvisioningEntry
- fix AccountingConstants to avoid using @FindBugsSuppressWarnings
- fix SelfLoansDataValidator instead of @FindBugsSuppressWarnings
- minor clean up in build.gradle (spotbugs has replaced findbugs)
PS: This change originally included also fixing the missing hashCode()
and equals() in ShareAccountCharge, but that turned out to be non
trivial, see FINERACT-827, and is thus not yet fixed by this.
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.