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

RandomProvider.nextLong can be return negative value with positive range #256

Open
samuele794 opened this issue Jan 18, 2025 · 1 comment · May be fixed by #259
Open

RandomProvider.nextLong can be return negative value with positive range #256

samuele794 opened this issue Jan 18, 2025 · 1 comment · May be fixed by #259

Comments

@samuele794
Copy link

samuele794 commented Jan 18, 2025

Hi,
with RandomProvider.nextLong(min,max) you can assign any min value but with max value as Long.MAX_VALUE,
and methon can be return negative values

Faker version: 2.0.0-rc.7

Example
faker.random.nextLong(min = 1, max = Long.MAX_VALUE)

Image

@serpro69
Copy link
Owner

Hi @samuele794 ,
Thanks for reporting the issue!
I will take a look at this, unless you'd like to contribute a fix?

@serpro69 serpro69 linked a pull request Feb 18, 2025 that will close this issue
1 task
@serpro69 serpro69 linked a pull request Feb 18, 2025 that will close this issue
1 task
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 a pull request may close this issue.

2 participants