-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MODFIN-320] New endpoint for batch transaction processing #386
Conversation
Regarding the code warnings:
|
} catch (Exception ex) { | ||
return Future.failedFuture(ex); | ||
} | ||
if (!batch.getTransactionsToCreate().isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CollectionUtils.isNotEmpty is more preferable here, because NPE is not possible and easier to read without !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just small suggestion to use switch cases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A switch would assume only one case is processed. Here we want to process all operations. I added more implementation to clarify.
Regarding isNotEmpty()
: it would not hurt to use it, but I think getTransactionsToCreate()
can never be null, and with my new implementation this is no longer needed.
src/main/java/org/folio/service/transactions/BatchTransactionService.java
Outdated
Show resolved
Hide resolved
src/main/java/org/folio/service/transactions/BatchTransactionService.java
Show resolved
Hide resolved
} catch (Exception ex) { | ||
return Future.failedFuture(ex); | ||
} | ||
if (!batch.getTransactionsToCreate().isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just small suggestion to use switch cases
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 5 New issues |
Purpose
MODFIN-320 - Create batch endpoint to update list of transactions at single request
Approach
Defined the new endpoint, implemented with a minimal "not implemented" basis.
See also: PR with new model in acq-models, mod-finance PR.
Pre-Merge Checklist:
Before merging this PR, please go through the following list and take appropriate actions.
If there are breaking changes, please STOP and consider the following:
Ideally, all the PRs involved in breaking changes would be merged on the same day
to avoid breaking the folio-testing environment.
Communication is paramount if that is to be achieved,
especially as the number of inter-module and inter-team dependencies increase.
While it's helpful for reviewers to help identify potential problems,
ensuring that it's safe to merge is ultimately the responsibility of the PR assignee.