diff options
author | andreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-16 21:31:55 +0000 |
---|---|---|
committer | andreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-16 21:31:55 +0000 |
commit | 7392d513b3ff36864f1607f28bf1c7d652c57590 (patch) | |
tree | 5293daa3ade2dca5b8b310eb205ac6720043cfd7 /libjava/java | |
parent | f92cbd910b31f35f0169761bdf27e2241c66d1ee (diff) | |
download | gcc-7392d513b3ff36864f1607f28bf1c7d652c57590.tar.gz |
2004-11-16 Andreas Tobler <a.tobler@schweiz.ch>
* java/security/Security.java (Security): Silence the warning about no
providers found in the no debug case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90765 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/security/Security.java | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/libjava/java/security/Security.java b/libjava/java/security/Security.java index 1820319c06d..01c0a0587d6 100644 --- a/libjava/java/security/Security.java +++ b/libjava/java/security/Security.java @@ -40,6 +40,8 @@ package java.security; import gnu.java.security.action.GetPropertyAction; +import gnu.classpath.Configuration; + import java.io.IOException; import java.io.InputStream; import java.net.URL; @@ -81,20 +83,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() { |