[infinispan-issues] [JBoss JIRA] (ISPN-11230) Remove all usages of java.util.UUID.randomUUID()

Tristan Tarrant (Jira) issues at jboss.org
Mon Feb 17 08:15:00 EST 2020


    [ https://issues.redhat.com/browse/ISPN-11230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973586#comment-13973586 ] 

Tristan Tarrant commented on ISPN-11230:
----------------------------------------

Additionally, a checkstyle rule to catch calls to the JDK version.

> Remove all usages of java.util.UUID.randomUUID()
> ------------------------------------------------
>
>                 Key: ISPN-11230
>                 URL: https://issues.redhat.com/browse/ISPN-11230
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: CLI, Core, Embedded Querying, Server
>    Affects Versions: 9.4.17.Final, 10.1.1.Final
>            Reporter: Dan Berindei
>            Assignee: Dan Berindei
>            Priority: Major
>             Fix For: 11.0.0.Final
>
>
> {{java.util.UUID.randomUUID()}} uses a "cryptographically strong pseudo random number generator", which reads from {{/dev/urandom}} (or even {{/dev/random}} in older Java versions), and then computes an expensive cryptographic digest on the bytes it read.
> We don't need a cryptographically strong random number, so we can use {{org.infinispan.commons.util.Util.threadLocalRandomUUID()}} instead.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the infinispan-issues mailing list