Commit Graph
660 Commits
Author SHA1 Message Date
Michael Vorburger 1b1e80b6b1 Log errors from cron jobs individually and with cause (FINERACT-858)
instead of current huge JobExecutionException message (without cause)
2020-03-10 17:10:01 +01:00
Michael Vorburger ⛑️andGitHub 0c9273a11b throw exception with details in InteropServiceImpl (FINERACT-860) (#728)
instead of the NoSuchElementException from Optional.get(), we're now
throwing an UnsupportedOperationException which includes the details of
the missing object.  (This kind of detailed exception was already thrown
in two existing places in the same code after a null check, but it never
reached there, because the Optional.get() failed earlier.  Another
option would have been to return null for an absent Optional, but this
is better.)

The other unrelated changes are automatic clean up actions (in Eclipse).
2020-03-10 12:29:07 +01:00
thesmallstarandMichael Vorburger ⛑️ a34742b59a Made SQL builder ColumnName regex more general 2020-03-10 11:36:49 +01:00
Michael Vorburger 753554e281 Fix audit trails filter (FINERACT-808)
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.
2020-03-10 11:36:49 +01:00
xurrorandMichael Vorburger ⛑️ a7ebef4781 FINERACT-807
change mifosplatform-tenants and mifostenant-default to fineract_tenants
 and fineract_default respectively

closes https://issues.apache.org/jira/projects/FINERACT/issues/FINERACT-807?filter=allopenissues
2020-03-08 14:16:05 +01:00
Awasum YannickandMichael Vorburger ⛑️ 51f23613ad Fix checkstyle problem in UserAdministrationTest 2020-03-05 15:19:38 +01:00
Awasum YannickandGitHub d4002f22a8 FINERACT-802-restrict-client-to-have-single-self-service-user (#664) 2020-03-05 09:40:13 +01:00
Manthan SurkarandGitHub 49c3450bed FINERACT-80: Include Group loans in resultset (#717) 2020-03-02 20:57:35 +01:00
228ec22a60 Allow customizing Tenants DB JDBC uid/pwd/driver (FINERACT-806) (#713)
* Allow customizing Tenants DB JDBC uid/pwd/driver (FINERACT-806)

Added Java system properties for username and password to docker-compose

Modified sever.xml to get username and password

* Fixes for customizing Tenants DB JDBC uid/pwd/driver (FINERACT-806)

* Use random MYSQL_ROOT_PASSWORD in docker-compose.yml (FINERACT-806)

This provides future non-regression testing that the the customized
MySQL password is actually really used, and it doesn't just work because
"mysql" is still hard-coded anywhere.

Co-authored-by: Yemdjih Kaze Nasser <kaze.nasser@outlook.com>
2020-02-09 19:36:58 +01:00
xurrorandMichael Vorburger ⛑️ 78eb402206 FINERACT-840
Update API docs and demo app URL
2020-02-06 18:26:47 -08:00
Tomer MosheandGitHub 45978337b2 Fixed openjpa.persistence.InvalidStateException (#711)
* Update AbstractPersistableCustom.java

Made AbstractPersistableCustom serializable to solve org.apache.openjpa.persistence.InvalidStateException

* Update AbstractPersistableCustom.java

removed space
2020-02-06 08:20:42 +01:00
percyashuandMichael Vorburger ⛑️ aadc2a006c FINERACT-775 Clean up Util 2020-02-02 11:36:53 +01:00
percyashuandMichael Vorburger ⛑️ 7d99d783d5 FINERACT-776 Fix TopicTest failure 2020-01-30 20:24:40 +01:00
Michael Vorburger ⛑️andAwasum Yannick 28db242884 Activate and Enforce new Checkstyle check related to import statement order (FINERACT-821) (#704)
* 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
2020-01-28 00:28:11 +01:00
Awasum YannickandMichael Vorburger ⛑️ 66ae79bbe7 Upgrade Spring Boot from 2.1.7 to 2.2.4 2020-01-27 21:05:29 +01:00
Angel CajasandMichael Vorburger ⛑️ 5c19ed9385 FINERACT-820: Add a new condition so the Java Calendar Sunday value matches witch Fineract 2020-01-27 08:09:54 +01:00
Shaik Nazeer Hussain 1848056e6f Revert "FINERACT-820 - Fixing Integration Test which fails on Sundays"
This reverts commit e9e0bbc930.
2020-01-26 17:43:15 +05:30
Shaik Nazeer Hussain e9e0bbc930 FINERACT-820 - Fixing Integration Test which fails on Sundays 2020-01-25 12:18:59 +05:30
Adam Saghy e1666ba8fc FINERACT-839: NPE when creating a Loan for a client fix 2020-01-23 15:10:28 +01:00
Michael Vorburger dd7503f296 remove all trailing spaces in Java files (FINERACT-821)
find . -type f -name "*.java" -exec sed -i 's/ *$//' '{}' ';'
2020-01-19 19:58:21 +01:00
Michael Vorburger b0196049f1 replace 51013 Tabs with 4 Spaces in 3122 Java files (FINERACT-821)
rpl -eRxjava "\t" "    " .
2020-01-19 19:58:21 +01:00
Michael Vorburger 68006ae8f2 convert all Java files from DOS to UNIX line ending (FINERACT-821)
find . -type f -name "*.java" -exec dos2unix '{}' ';'
2020-01-19 19:58:21 +01:00
Michael Vorburger 125924303b Temporarily remove the build realted Swagger changes (FINERACT-733)
as well as implement all review feedback provided on the original PR

see https://github.com/apache/fineract/pull/629 for background

also https://jira.apache.org/jira/browse/FINERACT-733
2020-01-19 15:24:11 +01:00
Kang BrederandMichael Vorburger ⛑️ e424471162 Initial Swagger related changes from GSOC 2019 contrib (FINERACT-733)
This commit does not yet provide the full Swagger requirement, as was
outlined in FINERACT-733, but it's a first step forming the basis of
more to come (hopefully).  Here's the original PR description (but
note that some of this is about to be reverted in the next commit):


Reflected all API descriptions on swagger UI.

Formatted API descriptions.

Added swagger docs for new APIs.

Added swagger-gradle-plugin for automatic save of json during build.

Leveraged swagger codegen for generation of language-specific libraries
using gradle-swagger-generator plugin.
2020-01-19 15:24:11 +01:00
Awasum YannickandGitHub eee163aece Merge pull request #685 from vorburger/spotbugs-extra-GLAccountBuilder
clean up GLAccountBuilder, following SpotBugs (FINERACT-702)
2020-01-14 08:37:58 +01:00
Awasum YannickandGitHub fc786fa3f6 Merge pull request #684 from vorburger/spotbugs-extra
more SpotBugs related / inspired code clean up (see FINERACT-702)
2020-01-14 08:37:20 +01:00
Angel CajasandMichael Vorburger ⛑️ efb0a558c8 FINERACT-824:
Removed the second validation since realCause.getCause() is null if it is equal to realCause
2020-01-14 08:28:43 +01:00
Michael Vorburger 6ca1a678cb more SpotBugs related / inspired code clean up (see FINERACT-702)
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.
2020-01-13 08:41:16 +01:00
Michael Vorburger 4e1d87f20a fix broken docker-compose set up (re. FINERACT-773)
This fixed bugs introduced in edc9e030e1
(in https://github.com/apache/fineract/pull/648) which for FINERACT-773
actually broke things more instead of adding the intended feature, cauz:

1. FINERACT_DEFAULT_TENANTDB_HOSTNAME and FINERACT_DEFAULT_TENANTDB_PORT
   were meant to be OS Environment Variables, not Java System properties
   and so need to be read via System.getenv() not System.getProperty(),
   duh!

2. The Travis CI test which was meant to ensure non-regression for this
   broke in that same change, because the "|| docker logs" introduced at
   the same time would always pass (EITHER because "http" passed OR
   if not then "docker logs" would return 0), duh again!

Both were dumb, not sure what I was thinking when I had hacked this.. ;)
2020-01-12 20:44:22 +01:00
Michael Vorburger a5c60b06e5 clean up GLAccountBuilder, following SpotBugs (FINERACT-702)
SpotBugs didn't like the original version, and the initial changes made
for SpotBugs satisfied SpotBugs, but the class was still pretty weird.
This change makes it follow the regular standard builder pattern.
2020-01-12 13:23:26 +01:00
Michael Vorburger 89b996cf58 Revert changes made to LoanReschedulingWithinCenterTest (FINERACT-702)
@awasum changed this in the SpotBugs related work, but this seems both
wrong, and, for me, makes this test now fail instead of pass (even
though for him it passed on the original PR...).

Probably related to https://issues.apache.org/jira/browse/FINERACT-820;
note that my current local time as I'm testing this is Sunday, and it
WORKS with; I'm now confused when FINERACT-820 affects us and when not.
Or perhaps this has nothing at all to do with that.
2020-01-12 13:16:42 +01:00
Awasum YannickandMichael Vorburger ⛑️ af0dd7e5f3 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.
2020-01-12 13:16:42 +01:00
Sidney WasibaniandMichael Vorburger ⛑️ 865e5a54a3 FINERACT-803 change the license comment type 2020-01-10 16:38:44 +01:00
Sidney WasibaniandMichael Vorburger ⛑️ ff702dbd19 FINERACT-803 fix exception handling for username duplication 2020-01-10 16:38:44 +01:00
Michael Vorburger a93a6b8487 Change /authentication API to pass data in request body instead of URL arguments (FINERACT-726) 2020-01-08 22:50:16 +01:00
Michael Vorburger ⛑️ 030d9c8bd8 fix potential NPE in JobParameter.equals() (FINERACT-428) 2019-12-12 21:39:45 +00:00
Kumaranath FernandoandMichael Vorburger ⛑️ 0da4cdd412 Parallelization of Jobs: Parallelizing and paging of recalculate interest for loans (PR #524 for FINERACT-428) 2019-12-12 21:44:44 +01:00
Michael Vorburger ⛑️andGitHub cc181b5742 reset/verify all default global configurations in some integration tests (PR #671 for FINERACT-722)
Remove necessary resetting of 2 select default global configurations in FlexibleSavingsInterestPostingIntegrationTest.

Fixes issue where global configurations were affecting state between integration tests. This caused LoanReschedulingWithinCenterTest to fail on the first day of the month only because the "skip-repayment-on-first-day-of-month" configuration was modified but never reset by GlobalConfigurationTest.

Also updated other integration tests to reset and verify default global configurations.

FINERACT-722
2019-12-12 09:21:45 +01:00
andrew-dzakandMichael Vorburger ⛑️ 0474f59bcf fix overdraft account balance (PR #659 for FINERACT-753) 2019-12-11 07:59:50 +01:00
Mohit SinhaandGitHub 9674e0a718 Revert "FINERACT-803: validate username uniqueness" 2019-12-07 23:24:00 +07:00
Mohit SinhaandGitHub fb1e3d7c18 Merge pull request #660 from jamesidw/FINERACT-803
FINERACT-803: validate username uniqueness
2019-12-03 19:17:21 +07:00
Sidney Wasibani d9a0a9ac63 FINERACT-803: validate username uniqueness
FINERACT-803: treat existing username in update, to same user, as valid

FINERACT-803: skip username uniqueness validation for updates

FINERACT-803: add integration test for username uniqueness validation

FINERACT-803: change the validation error message to show the errant username

FINERACT-803: restore username uniqueness validation for updates

FINERACT-803: apply minor code clean up suggestions
2019-12-03 14:07:37 +03:00
xurrorandMichael Vorburger ⛑️ 0440a36317 remove todos from XBRLBuiderTest 2019-12-01 17:12:25 -08:00
Maek TwainandMichael Vorburger ⛑️ 981bc17a60 Adding vnd.ms-excel MIME type support in BulkImportWorkbookServiceImpl (#650) 2019-11-27 18:33:17 -08:00
Michael Vorburger edc9e030e1 Allow customizing JDBC URLs at run-time instead of during container build (FINERACT-773)
In Docker, set JAVA_OPTS instead of FINERACT_TENANTS_URL.

Because ARG/ENV in the Dockerfile can't (easily) be changed at run-time.

At first I tried to override the ENTRYPOINT with a script which sets
JAVA_OPTS based on FINERACT_TENANTS_URL and then delegates to the original
/app-entrypoint.sh; that didn't immediately work, so this seems simpler.

Including make default tenant JDBC hostname & port configurable at Docker container run instead of build time.
2019-11-26 06:06:59 +01:00
Awasum YannickandGitHub 3ea8d209bb Merge pull request #655 from xurror/develop
remove TODO Auto-generated method stub
2019-11-25 09:00:51 +01:00
xurror b0bfeddc62 remove TODO Auto-generated method stub 2019-11-25 08:58:07 +01:00
Awasum YannickandGitHub e7868706f5 Merge pull request #657 from vorburger/log-less
reduce excessive logging causing Travis CI problems (FINERACT-800)
2019-11-25 08:12:27 +01:00
Kang BrederandMichael Vorburger ⛑️ 2770f78cc4 Corrected all Swagger documents found in the Accounting module by adding API description in anappropriate manner and the response.json file found in the swagger UI has been updated with the latest changes. 2019-11-24 23:08:59 -08:00
Kang BrederandMichael Vorburger ⛑️ 5ce86eaced Added description to Batch API swagger document in a correct manner. 2019-11-24 23:08:05 -08:00