Skip to content

Do not call Random for singletone lists #564

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

Merged
merged 1 commit into from
Nov 28, 2022
Merged

Conversation

snuyanzin
Copy link
Collaborator

There is no need to call random to pick a random element from list in case there is less than 2 elements

@codecov-commenter
Copy link

codecov-commenter commented Nov 28, 2022

Codecov Report

Merging #564 (ea661bc) into main (77806d3) will decrease coverage by 0.08%.
The diff coverage is 56.25%.

@@             Coverage Diff              @@
##               main     #564      +/-   ##
============================================
- Coverage     92.68%   92.60%   -0.09%     
  Complexity     2412     2412              
============================================
  Files           250      250              
  Lines          5047     5055       +8     
  Branches        543      546       +3     
============================================
+ Hits           4678     4681       +3     
- Misses          241      247       +6     
+ Partials        128      127       -1     
Impacted Files Coverage Δ
.../java/net/datafaker/service/FakeValuesService.java 86.69% <56.25%> (-0.63%) ⬇️
.../main/java/net/datafaker/service/FakerContext.java 89.74% <0.00%> (-2.57%) ⬇️

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

@snuyanzin snuyanzin merged commit edcabda into datafaker-net:main Nov 28, 2022
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.

2 participants