summaryrefslogtreecommitdiff
path: root/java/security
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2005-04-28 05:42:42 +0000
committerMichael Koch <konqueror@gmx.de>2005-04-28 05:42:42 +0000
commitdc5f223669a98d476bb8e8ce1bcf324f2b67570b (patch)
treef119d8d58c4819b96a7786f93aa7ae1c4504d6cf /java/security
parent68784d05994f42ab56fa46371259c61fbb32d770 (diff)
downloadclasspath-dc5f223669a98d476bb8e8ce1bcf324f2b67570b.tar.gz
2005-04-28 Michael Koch <konqueror@gmx.de>
* java/security/AccessControlContext.java: Reformatted. 2005-04-28 Andreas Tobler <a.tobler@schweiz.ch> * java/security/Security.java (Security): Silence the warning about no providers found in the no debug case.
Diffstat (limited to 'java/security')
-rw-r--r--java/security/AccessControlContext.java2
-rw-r--r--java/security/Security.java37
2 files changed, 24 insertions, 15 deletions
diff --git a/java/security/AccessControlContext.java b/java/security/AccessControlContext.java
index 8d2b59f8a..a72f0d367 100644
--- a/java/security/AccessControlContext.java
+++ b/java/security/AccessControlContext.java
@@ -65,7 +65,7 @@ public final class AccessControlContext
*
* @param context The ProtectionDomains to use
*/
- public AccessControlContext(ProtectionDomain[]context)
+ public AccessControlContext(ProtectionDomain[] context)
{
HashSet domains = new HashSet (context.length);
for (int i = 0; i < context.length; i++)
diff --git a/java/security/Security.java b/java/security/Security.java
index 35c1dc3fd..15b76c014 100644
--- a/java/security/Security.java
+++ b/java/security/Security.java
@@ -40,6 +40,8 @@ package java.security;
import gnu.classpath.SystemProperties;
+import gnu.classpath.Configuration;
+
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -79,20 +81,27 @@ public final class Security
if (!loadProviders (base, "classpath")
&& !loaded
&& providers.size() == 0)
- {
- // No providers found and both security files failed to load properly.
- System.err.println
- ("WARNING: could not properly read security provider files:");
- System.err.println
- (" " + base + "/security/" + vendor + ".security");
- System.err.println
- (" " + base + "/security/" + "classpath" + ".security");
- System.err.println
- (" Falling back to standard GNU security provider");
- providers.addElement (new gnu.java.security.provider.Gnu());
- }
- }
-
+ {
+ if (Configuration.DEBUG)
+ {
+ /* No providers found and both security files failed to
+ * load properly. Give a warning in case of DEBUG is
+ * enabled. Could be done with java.util.logging later.
+ */
+ System.err.println
+ ("WARNING: could not properly read security provider files:");
+ System.err.println
+ (" " + base + "/security/" + vendor
+ + ".security");
+ System.err.println
+ (" " + base + "/security/" + "classpath"
+ + ".security");
+ System.err.println
+ (" Falling back to standard GNU security provider");
+ }
+ providers.addElement (new gnu.java.security.provider.Gnu());
+ }
+ }
// This class can't be instantiated.
private Security()
{