tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1600833 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
Date Fri, 06 Jun 2014 09:19:17 GMT
Author: markt
Date: Fri Jun  6 09:19:17 2014
New Revision: 1600833

URL: http://svn.apache.org/r1600833
Log:
Don't assume that tests use the StandardManger

Modified:
    tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1600833&r1=1600832&r2=1600833&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Fri Jun  6 09:19:17
2014
@@ -42,11 +42,13 @@ import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleState;
+import org.apache.catalina.Manager;
 import org.apache.catalina.Server;
 import org.apache.catalina.Service;
 import org.apache.catalina.connector.Connector;
 import org.apache.catalina.core.AprLifecycleListener;
 import org.apache.catalina.core.StandardServer;
+import org.apache.catalina.session.ManagerBase;
 import org.apache.catalina.session.StandardManager;
 import org.apache.catalina.valves.AccessLogValve;
 import org.apache.coyote.http11.Http11NioProtocol;
@@ -393,14 +395,15 @@ public abstract class TomcatBaseTest ext
                 Container e = service.getContainer();
                 for (Container h : e.findChildren()) {
                     for (Container c : h.findChildren()) {
-                        StandardManager m =
-                                (StandardManager) ((Context) c).getManager();
+                        Manager m = ((Context) c).getManager();
                         if (m == null) {
                             m = new StandardManager();
-                            m.setSecureRandomClass(
-                                    "org.apache.catalina.startup.FastNonSecureRandom");
                             ((Context) c).setManager(m);
                         }
+                        if (m instanceof ManagerBase) {
+                            ((ManagerBase) m).setSecureRandomClass(
+                                    "org.apache.catalina.startup.FastNonSecureRandom");
+                        }
                     }
                 }
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message