Commit Graph
709 Commits
Author SHA1 Message Date
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
Michael Vorburger ⛑️andAwasum Yannick 3a17da44df Activate and Enforce Checkstyle EqualsHashCode check. (#703)
Thanks to prior work for SpotBugs, this passes without requiring any
code adjustments.  (Fineract had a nubmer of problems in this space
before the SpotBugs work.)

Enabling this helps to ensure non-regression so that no new equals() and
hashCode() related bugs creep in.  (This does overlap a little bit with
SpotBugs, but the build time overhead to run the extra check is
completely negligible, so it seems worth having this.  If only just in
case SpotBugs for whatever reason in the future would get deactivated
again.)
2020-01-27 22:02:41 +01:00
Michael Vorburger ⛑️andAwasum Yannick 14175a1854 Minor: Remove comment in build.gradle re. springDataJpaVersion (#702)
This has been removed in a20f76d686,
and it's confusing to look for what that means, e.g. while code
reviewing proposed "bump" changes to the used versions of
spring.gradle:dependency-management-plugin and
springframework.boot:spring-boot-gradle-plugin.
2020-01-27 22:00:28 +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
Awasum YannickandMichael Vorburger ⛑️ 7774766245 Update Gradle version from 5.6.1 to 6.1 2020-01-26 10:19:55 +01:00
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 fbccc57fb9 enforce initial set of Checkstyle rules (FINERACT-821)
This is, intentionally, for whitespace related rules, only.

The idea is to now gradually extend it.
2020-01-19 19:59:38 +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 0379ba7628 fix build.gradle for RAT to ignore .github/workflows/ 2020-01-13 09:53:24 +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
Percy Ayuk AshuandMichael Vorburger ⛑️ 26b4e0000c use dependency's versions from Spring BOM (PR #668 for FINERACT-805) 2019-12-10 06:38:41 +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
Yemdjih Kaze NasserandMichael Vorburger ⛑️ a20f76d686 Use Spring Boot BOM to avoid maintaining version numbers in dependencies.gradle (#662 for FINERACT-797) 2019-12-02 07:44:35 -08:00
xurrorandMichael Vorburger ⛑️ 0440a36317 remove todos from XBRLBuiderTest 2019-12-01 17:12:25 -08:00
Percy Ayuk AshuandMichael Vorburger ⛑️ 451f4a6338 FINERACT-777 Use api / implementation scoped Gradle dependencies (#661)
see https://issues.apache.org/jira/browse/FINERACT-777
2019-12-01 17:08:31 -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 d553b421bf Merge pull request #658 from vorburger/dottheia
add .theia/settings.json
2019-11-25 08:30:27 +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
Sidney WasibaniandMichael Vorburger ⛑️ c601856ca4 FINERACT-787 add selfServiceRoles template resource 2019-11-24 22:54:37 -08:00
Michael Vorburger ⛑️ f255a597f8 add .theia/settings.json to avoid confusing prompt on http://gitpod.io
and exclude JSON files from RAT (because they cannot contain license header comments)
2019-11-25 07:44:37 +01:00
Michael Vorburger 8c65696d49 reduce excessive logging causing Travis CI problems (FINERACT-800) 2019-11-25 07:44:37 +01:00