Security.java (Security): Silence the warning about no providers found in the no debug case.

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.

From-SVN: r90765
This commit is contained in:
Andreas Tobler 2004-11-16 22:31:55 +01:00 committed by Andreas Tobler
parent d281a1f1bd
commit fd9065b2ef
2 changed files with 28 additions and 14 deletions

View File

@ -1,3 +1,8 @@
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.
2004-11-16 Michael Koch <konqueror@gmx.de> 2004-11-16 Michael Koch <konqueror@gmx.de>
* java/net/InetAddress.java * java/net/InetAddress.java

View File

@ -40,6 +40,8 @@ package java.security;
import gnu.java.security.action.GetPropertyAction; import gnu.java.security.action.GetPropertyAction;
import gnu.classpath.Configuration;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URL; import java.net.URL;
@ -81,20 +83,27 @@ public final class Security
if (!loadProviders (base, "classpath") if (!loadProviders (base, "classpath")
&& !loaded && !loaded
&& providers.size() == 0) && providers.size() == 0)
{ {
// No providers found and both security files failed to load properly. if (Configuration.DEBUG)
System.err.println {
("WARNING: could not properly read security provider files:"); /* No providers found and both security files failed to
System.err.println * load properly. Give a warning in case of DEBUG is
(" " + base + "/security/" + vendor + ".security"); * enabled. Could be done with java.util.logging later.
System.err.println */
(" " + base + "/security/" + "classpath" + ".security"); System.err.println
System.err.println ("WARNING: could not properly read security provider files:");
(" Falling back to standard GNU security provider"); System.err.println
providers.addElement (new gnu.java.security.provider.Gnu()); (" " + 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. // This class can't be instantiated.
private Security() private Security()
{ {