You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I found false negatives on RV_01_TO_INT when reading the source code of SpotBugs in line 1171 of DumbMethods.java
It seems that SpotBugs only checks for several APIs that generate a random value (Math.random() and nextDouble()) but omits the nextFloat() API that can be used for the same purpose.
However, I think that based on its bug description that "nextFloat()" is not mentioned as an exception, the pattern RV_01_TO_INT should provide more support to the method nextFloat().
Hi,
I found false negatives on
RV_01_TO_INT
when reading the source code of SpotBugs in line 1171 of DumbMethods.javaIt seems that SpotBugs only checks for several APIs that generate a random value (
Math.random()
andnextDouble()
) but omits thenextFloat()
API that can be used for the same purpose.However, I think that based on its bug description that "nextFloat()" is not mentioned as an exception, the pattern
RV_01_TO_INT
should provide more support to the methodnextFloat()
.Here is the demo,
The text was updated successfully, but these errors were encountered: