mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-12 07:10:26 +08:00
2004-10-18 Jeroen Frijters <jeroen@frijters.net>
* java/security/Security.java (static): Use AccessController.doPrivileged to get system property. From-SVN: r89225
This commit is contained in:
parent
691e8c0f15
commit
2ddfd02523
@ -1,3 +1,8 @@
|
||||
2004-10-18 Jeroen Frijters <jeroen@frijters.net>
|
||||
|
||||
* java/security/Security.java
|
||||
(static): Use AccessController.doPrivileged to get system property.
|
||||
|
||||
2004-10-18 Sven de Marothy <sven@physto.se>
|
||||
|
||||
* java/nio/ByteBufferHelper.java
|
||||
|
@ -37,10 +37,12 @@ exception statement from your version. */
|
||||
|
||||
package java.security;
|
||||
|
||||
import gnu.java.security.action.GetPropertyAction;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.InputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.security.AccessController;
|
||||
import java.security.Provider;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
@ -68,9 +70,11 @@ public final class Security
|
||||
|
||||
static
|
||||
{
|
||||
String base = System.getProperty ("gnu.classpath.home.url");
|
||||
String vendor = System.getProperty ("gnu.classpath.vm.shortname");
|
||||
|
||||
GetPropertyAction getProp = new GetPropertyAction("gnu.classpath.home.url");
|
||||
String base = (String) AccessController.doPrivileged(getProp);
|
||||
getProp = new GetPropertyAction("gnu.classpath.vm.shortname");
|
||||
String vendor = (String) AccessController.doPrivileged(getProp);
|
||||
|
||||
// Try VM specific security file
|
||||
boolean loaded = loadProviders (base, vendor);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user