Skip to content

Don't report for stream methods called on Random#2375

Merged
iloveeclipse merged 1 commit intospotbugs:masterfrom
appropriate:2370-random-streams
Mar 9, 2023
Merged

Don't report for stream methods called on Random#2375
iloveeclipse merged 1 commit intospotbugs:masterfrom
appropriate:2370-random-streams

Conversation

@md5
Copy link
Copy Markdown
Contributor

@md5 md5 commented Mar 9, 2023

If one of the stream-returning methods (doubles, ints, or longs) is called on Random or SecureRandom, don't report that the Random was only used once

Fixes #2370


Make sure these boxes are checked before submitting your PR -- thank you!

  • Added an entry into CHANGELOG.md if you have changed SpotBugs code

If one of the stream-returning methods (doubles, ints, or longs) is called on
Random or SecureRandom, don't report that the Random was only used once

Fixes spotbugs#2370
Copy link
Copy Markdown
Member

@iloveeclipse iloveeclipse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iloveeclipse iloveeclipse merged commit c0638b0 into spotbugs:master Mar 9, 2023
@iloveeclipse
Copy link
Copy Markdown
Member

Thanks!

@hazendaz hazendaz added this to the SpotBugs 4.8.0 milestone Dec 18, 2023
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.

False positive for DMI_RANDOM_USED_ONLY_ONCE with Stream methods

3 participants