java:S2925 should check TimeUnit.sleep()

The rule java:S2925 checks that Thread.sleep() is not used in tests. The rule should additionally check for usages of TimeUnit.sleep() which converts the TimeUnit's value to milliseconds and forwards to Thread.sleep().


Equivalent to:


Hello @oliver

Indeed, it makes sense to support it aswell. Ticket created: SONARJAVA-3838.

Thanks for the suggestion and have a nice day.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.