Skip to content
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

use computeIfAbsent to set the default consumers #129

Merged
merged 2 commits into from Dec 30, 2022

Conversation

mimfgg
Copy link
Collaborator

@mimfgg mimfgg commented Dec 29, 2022

I think that maybe using computeIfAbsent leads to a nicer result, what do you think?

(I also removed the split on | ... this is very specific to your inBounds example and can as well be done in the consumer)

@codecov-commenter
Copy link

Codecov Report

Merging #129 (007cd00) into ft/customFlags (b673f69) will decrease coverage by 0.34%.
The diff coverage is 84.37%.

@@                 Coverage Diff                  @@
##             ft/customFlags     #129      +/-   ##
====================================================
- Coverage             86.30%   85.96%   -0.35%     
  Complexity               35       35              
====================================================
  Files                    31       31              
  Lines                  2571     2551      -20     
  Branches                281      279       -2     
====================================================
- Hits                   2219     2193      -26     
- Misses                  236      242       +6     
  Partials                116      116              
Impacted Files Coverage Δ
...ain/java/com/decathlon/tzatziki/utils/Asserts.java 90.04% <84.37%> (-3.03%) ⬇️
.../main/java/com/decathlon/tzatziki/utils/Types.java 61.70% <0.00%> (-2.13%) ⬇️
...a/com/decathlon/tzatziki/steps/SpringJPASteps.java 77.60% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@brian-mulier
Copy link
Collaborator

👍 As discussed my goal was to give the consumer a simple arg-to-consume basis but it will probably lead to issues later on so better not to parse the args and let this responsibility to the consumer

@brian-mulier brian-mulier merged commit 96e1014 into Decathlon:ft/customFlags Dec 30, 2022
brian-mulier added a commit that referenced this pull request Dec 30, 2022
* feat: custom flags

* fix: do not strip flag arg if single arg

* use computeIfAbsent to set the default consumers (#129)

* use computeIfAbsent to set the default consumers

* fixed up documentation

* fix: doc

* fix: doc

* fix: synchronized flag map

Co-authored-by: Jeremy Comte <jeremy.comte@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants