This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: change how Security loads providers
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Subject: Patch: FYI: change how Security loads providers
- From: Tom Tromey <tromey at redhat dot com>
- Date: 17 Oct 2001 18:17:52 -0600
- Reply-To: tromey at redhat dot com
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