mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8329754: The ThreadSafe attribute is ignored for SecureRandom algorithm aliases
Reviewed-by: weijun
This commit is contained in:
parent
559fc711e0
commit
56387a0981
2 changed files with 40 additions and 19 deletions
|
@ -225,8 +225,8 @@ public class SecureRandom extends java.util.Random {
|
|||
if (provider == null || algorithm == null) {
|
||||
return false;
|
||||
} else {
|
||||
return Boolean.parseBoolean(provider.getProperty(
|
||||
"SecureRandom." + algorithm + " ThreadSafe", "false"));
|
||||
Service service = provider.getService("SecureRandom", algorithm);
|
||||
return Boolean.parseBoolean(service.getAttribute("ThreadSafe"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue