RFR 8024253: ThreadLocal random can use SecureRandom for the initial seed
Peter Levart
peter.levart at gmail.com
Mon Sep 16 12:52:58 UTC 2013
On 09/16/2013 02:46 PM, Peter Levart wrote:
> The InetAddress.getLocalHost() might throw SecurityException in some
> configurations (SecurityManager.checkConnect(localHostName, -1)). So
> perhaps, the call should be wrapped by AccessController.doPrivileged(...).
Correction: SecurityException is not propagated out of
InetAddress.getLocalHost(), but loopback address is returned in case the
security check fails, so AccessController.doPrivileged(...) might still
be needed to gain as much seed as possible.
Peter
More information about the core-libs-dev
mailing list