diff options
author | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-14 23:12:35 +0000 |
---|---|---|
committer | mark <mark@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-14 23:12:35 +0000 |
commit | ffde862e033a0825e1e9972a89c0f1f80b261a8e (patch) | |
tree | 97037d2c09c8384d80531f67ec36a01205df6bdb /libjava/classpath/gnu/java/security/PolicyFile.java | |
parent | b415ff10527e977c3758234fd930e2c027bfa17d (diff) | |
download | ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.tar.gz ppe42-gcc-ffde862e033a0825e1e9972a89c0f1f80b261a8e.zip |
2006-08-14 Mark Wielaard <mark@klomp.org>
Imported GNU Classpath 0.92
* HACKING: Add more importing hints. Update automake version
requirement.
* configure.ac (gconf-peer): New enable AC argument.
Add --disable-gconf-peer and --enable-default-preferences-peer
to classpath configure when gconf is disabled.
* scripts/makemake.tcl: Set gnu/java/util/prefs/gconf and
gnu/java/awt/dnd/peer/gtk to bc. Classify
gnu/java/security/Configuration.java as generated source file.
* gnu/java/lang/management/VMGarbageCollectorMXBeanImpl.java,
gnu/java/lang/management/VMMemoryPoolMXBeanImpl.java,
gnu/java/lang/management/VMClassLoadingMXBeanImpl.java,
gnu/java/lang/management/VMRuntimeMXBeanImpl.java,
gnu/java/lang/management/VMMemoryManagerMXBeanImpl.java,
gnu/java/lang/management/VMThreadMXBeanImpl.java,
gnu/java/lang/management/VMMemoryMXBeanImpl.java,
gnu/java/lang/management/VMCompilationMXBeanImpl.java: New VM stub
classes.
* java/lang/management/VMManagementFactory.java: Likewise.
* java/net/VMURLConnection.java: Likewise.
* gnu/java/nio/VMChannel.java: Likewise.
* java/lang/Thread.java (getState): Add stub implementation.
* java/lang/Class.java (isEnum): Likewise.
* java/lang/Class.h (isEnum): Likewise.
* gnu/awt/xlib/XToolkit.java (getClasspathTextLayoutPeer): Removed.
* javax/naming/spi/NamingManager.java: New override for StackWalker
functionality.
* configure, sources.am, Makefile.in, gcj/Makefile.in,
include/Makefile.in, testsuite/Makefile.in: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116139 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/gnu/java/security/PolicyFile.java')
-rw-r--r-- | libjava/classpath/gnu/java/security/PolicyFile.java | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/libjava/classpath/gnu/java/security/PolicyFile.java b/libjava/classpath/gnu/java/security/PolicyFile.java index 3064f041b9d..8da3a7d72fe 100644 --- a/libjava/classpath/gnu/java/security/PolicyFile.java +++ b/libjava/classpath/gnu/java/security/PolicyFile.java @@ -1,5 +1,5 @@ /* PolicyFile.java -- policy file reader - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -37,9 +37,9 @@ exception statement from your version. */ package gnu.java.security; -import gnu.classpath.SystemProperties; import gnu.classpath.debug.Component; import gnu.classpath.debug.SystemLogger; +import gnu.java.security.action.GetPropertyAction; import java.io.File; import java.io.IOException; @@ -148,16 +148,17 @@ public final class PolicyFile extends Policy // Constants and fields. // ------------------------------------------------------------------------- - private static final Logger logger = SystemLogger.SYSTEM; - + protected static final Logger logger = SystemLogger.SYSTEM; + // Added to cut redundant AccessController.doPrivileged calls + private static GetPropertyAction prop = new GetPropertyAction("file.seperator"); + private static final String fs = (String) AccessController.doPrivileged(prop); + private static final String DEFAULT_POLICY = - SystemProperties.getProperty("java.home") - + SystemProperties.getProperty("file.separator") + "lib" - + SystemProperties.getProperty("file.separator") + "security" - + SystemProperties.getProperty("file.separator") + "java.policy"; + (String) AccessController.doPrivileged(prop.setParameters("java.home")) + + fs + "lib" + fs + "security" + fs + "java.policy"; private static final String DEFAULT_USER_POLICY = - SystemProperties.getProperty ("user.home") + - SystemProperties.getProperty ("file.separator") + ".java.policy"; + (String) AccessController.doPrivileged(prop.setParameters("user.home")) + + fs + ".java.policy"; private final Map cs2pc; @@ -216,7 +217,7 @@ public final class PolicyFile extends Policy String allow = Security.getProperty ("policy.allowSystemProperty"); if (allow == null || Boolean.getBoolean (allow)) { - String s = SystemProperties.getProperty ("java.security.policy"); + String s = System.getProperty ("java.security.policy"); logger.log (Component.POLICY, "java.security.policy={0}", s); if (s != null) { |