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]
Other format: [Raw text]

[patch] make security tests silent


Hi all,

would this be accepted to make the security tests silent?
Or do you have other DEBUG preferences?

Andreas

P.S, with CL if ok. And reposted.

Index: java/security/Security.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/security/Security.java,v
retrieving revision 1.23
diff -u -r1.23 Security.java
--- java/security/Security.java 21 Oct 2004 20:21:04 -0000      1.23
+++ java/security/Security.java 15 Nov 2004 08:08:44 -0000
@@ -40,6 +40,8 @@

 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 @@
       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.
+                      */
+                     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()
   {


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