IcoreE opened a new pull request, #1539:
URL: https://github.com/apache/commons-lang/pull/1539

   **1. Make private static singleton variables final in RandomUtils**
   The RandomUtils class maintains three core singleton instances exposed via 
static fields, which are currently missing the final modifier:
   
   
   ```
   private static RandomUtils INSECURE = new 
RandomUtils(ThreadLocalRandom::current);
   private static RandomUtils SECURE = new RandomUtils(SecureRandom::new);
   private static RandomUtils SECURE_STRONG = new 
RandomUtils(SECURE_STRONG_SUPPLIER); 
   ```
   The cause of the error is similar to that of 
[LANG-1799](https://issues.apache.org/jira/browse/LANG-1799)
    
   
   **2. Fix Javadoc for insecure() methods in RandomUtils and 
RandomStringUtils**
   
   The current Javadoc for RandomUtils.insecure() contains misleading 
information:
   
   `"use {@link #secure()} to use an algorithms/providers specified in the 
{@code securerandom.strongAlgorithms}" `
   
   This is incorrect because the securerandom.strongAlgorithms property is only 
used by secureStrong(), which internally relies on 
SecureRandom.getInstanceStrong(). The secure() method uses 
SecureRandom.SecureRandom() (default algorithm) and has no connection to 
securerandom.strongAlgorithms.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to