[Patch] java.security - using SystemProperties

Michael Koch konqueror@gmx.de
Tue Apr 26 05:26:00 GMT 2005


Hi list,


I just merged the attached patch from GNU classpath.


Michael


2005-04-26  Jeroen Frijters  <jeroen@frijters.net>

	* java/security/Security.java,
	java/security/cert/X509CRLSelector.java,
	java/security/cert/X509CertSelector.java:
	Modified to use SystemProperties.

-------------- next part --------------
Index: java/security/Security.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/Security.java,v
retrieving revision 1.24
diff -u -r1.24 Security.java
--- java/security/Security.java	16 Nov 2004 21:31:55 -0000	1.24
+++ java/security/Security.java	26 Apr 2005 05:21:31 -0000
@@ -38,7 +38,7 @@
 
 package java.security;
 
-import gnu.java.security.action.GetPropertyAction;
+import gnu.classpath.SystemProperties;
 
 import gnu.classpath.Configuration;
 
@@ -71,10 +71,8 @@
   
   static
     {
-      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);
+      String base = SystemProperties.getProperty("gnu.classpath.home.url");
+      String vendor = SystemProperties.getProperty("gnu.classpath.vm.shortname");
 
       // Try VM specific security file
       boolean loaded = loadProviders (base, vendor);
Index: java/security/cert/X509CRLSelector.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/cert/X509CRLSelector.java,v
retrieving revision 1.3
diff -u -r1.3 X509CRLSelector.java
--- java/security/cert/X509CRLSelector.java	21 Oct 2004 20:21:04 -0000	1.3
+++ java/security/cert/X509CRLSelector.java	26 Apr 2005 05:21:31 -0000
@@ -38,14 +38,13 @@
 
 package java.security.cert;
 
-import gnu.java.security.action.GetPropertyAction;
+import gnu.classpath.SystemProperties;
 import gnu.java.security.der.DERReader;
 import gnu.java.security.der.DERValue;
 
 import java.io.IOException;
 import java.io.InputStream;
 import java.math.BigInteger;
-import java.security.AccessController;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -336,8 +335,7 @@
   public String toString()
   {
     StringBuffer str = new StringBuffer(X509CRLSelector.class.getName());
-    GetPropertyAction getProp = new GetPropertyAction("line.separator");
-    String nl = (String) AccessController.doPrivileged(getProp);
+    String nl = SystemProperties.getProperty("line.separator");
     String eol = ";" + nl;
 
     str.append(" {").append(nl);
Index: java/security/cert/X509CertSelector.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/cert/X509CertSelector.java,v
retrieving revision 1.2
diff -u -r1.2 X509CertSelector.java
--- java/security/cert/X509CertSelector.java	21 Oct 2004 20:21:04 -0000	1.2
+++ java/security/cert/X509CertSelector.java	26 Apr 2005 05:21:31 -0000
@@ -38,12 +38,11 @@
 
 package java.security.cert;
 
+import gnu.classpath.SystemProperties;
 import gnu.java.security.OID;
-import gnu.java.security.action.GetPropertyAction;
 
 import java.io.IOException;
 import java.math.BigInteger;
-import java.security.AccessController;
 import java.security.KeyFactory;
 import java.security.PublicKey;
 import java.security.spec.X509EncodedKeySpec;
@@ -1024,8 +1023,7 @@
   public String toString()
   {
     StringBuffer str = new StringBuffer(X509CertSelector.class.getName());
-    GetPropertyAction getProp = new GetPropertyAction("line.separator");
-    String nl = (String) AccessController.doPrivileged(getProp);
+    String nl = SystemProperties.getProperty("line.separator");
     String eol = ";" + nl;
     str.append(" {").append(nl);
     if (cert != null)


More information about the Java-patches mailing list