You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by GitBox <gi...@apache.org> on 2021/02/18 02:55:27 UTC

[GitHub] [nutch] lewismc opened a new pull request #571: NUTCH-2851 Random object created and used only once

lewismc opened a new pull request #571:
URL: https://github.com/apache/nutch/pull/571


   This PR addresses https://issues.apache.org/jira/browse/NUTCH-2851
   I chose the following proposed fix...
   
   Create a constant Random in the offending class
   ```
   private static final Random RANDOM = new Random();
   ```
   We then reuse as follows
   ```
   RANDOM.nextInt();
   ```
   This way, no new instances are created.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nutch] sebastian-nagel commented on pull request #571: NUTCH-2851 Random object created and used only once

Posted by GitBox <gi...@apache.org>.
sebastian-nagel commented on pull request #571:
URL: https://github.com/apache/nutch/pull/571#issuecomment-781310608


   +1


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [nutch] lewismc merged pull request #571: NUTCH-2851 Random object created and used only once

Posted by GitBox <gi...@apache.org>.
lewismc merged pull request #571:
URL: https://github.com/apache/nutch/pull/571


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org