This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: FYI: change how Security loads providers


I'm checking this in.
This changes java.security.Security to look for both
classpath.security and libgcj.security files.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* java/security/Security.java (loadProviders): Added `vendor'
	argument.
	Load both `classpath' and `java.vm.name' providers.

Index: java/security/Security.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/Security.java,v
retrieving revision 1.4
diff -u -r1.4 Security.java
--- java/security/Security.java 2001/10/17 18:03:41 1.4
+++ java/security/Security.java 2001/10/18 00:01:01
@@ -49,7 +49,8 @@
 
   static
   {
-    loadProviders();
+    loadProviders(System.getProperty("java.vm.name"));
+    loadProviders("classpath");
   }
 
   // This class can't be instantiated.
@@ -57,12 +58,16 @@
   {
   }
 
-  private static void loadProviders()
+  private static void loadProviders(String vendor)
   {
+    if (vendor == null)
+      return;
+
     String separator = System.getProperty("file.separator");
-    String secfilestr = System.getProperty("java.home") +
-      separator + "lib" + separator + "security" + separator +
-      "classpath.security";
+    String secfilestr = (System.getProperty("java.home") +
+			 separator + "lib" +
+			 separator + "security" +
+			 separator + vendor + ".security");
 
     providerCount = 0;
     try


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]