[
https://issues.apache.org/jira/browse/HBASE-26582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504195#comment-17504195
]
Duo Zhang commented on HBASE-26582:
-----------------------------------
TestHBaseTestingUtil.testResolvePortConflict is failing after this PR.
The problem is that, now we use ThreadLocalRandom instead of Random, so the
current mock way does not work.
If we still want to keep this test, I think we need another way to produce
conflict...
> Prune use of Random and SecureRandom objects
> --------------------------------------------
>
> Key: HBASE-26582
> URL: https://issues.apache.org/jira/browse/HBASE-26582
> Project: HBase
> Issue Type: Sub-task
> Reporter: Andrew Kyle Purtell
> Assignee: Andrew Kyle Purtell
> Priority: Minor
> Fix For: 2.5.0, 2.6.0, 3.0.0-alpha-3, 2.4.11
>
>
> While looking over Findbugs/Spotbugs findings on HBASE-26555 I noticed we
> have some violations of Spotbugs rules regarding lack of Random object
> re-use, and generally have a lot of static Random and SecureRandom objects in
> our code, especially in tests, where ThreadLocalRandom would be more than
> sufficient.
> This is nitty stuff but let's clean it up. It will reduce noise on the
> analysis reports and SecureRandom is unnecessarily slow when used wherever we
> don't need it.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)