tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1600858 - /tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
Date Fri, 06 Jun 2014 12:02:39 GMT
Author: markt
Date: Fri Jun  6 12:02:38 2014
New Revision: 1600858

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

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

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1600858&r1=1600857&r2=1600858&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Fri Jun  6 12:02:38
2014
@@ -41,11 +41,13 @@ import org.junit.Before;
 import org.apache.catalina.Container;
 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.tomcat.util.buf.ByteChunk;
@@ -372,13 +374,15 @@ public abstract class TomcatBaseTest ext
                 Container e = service.getContainer();
                 for (Container h : e.findChildren()) {
                     for (Container c : h.findChildren()) {
-                        StandardManager m = (StandardManager) c.getManager();
+                        Manager m = c.getManager();
                         if (m == null) {
                             m = new StandardManager();
-                            m.setSecureRandomClass(
-                                    "org.apache.catalina.startup.FastNonSecureRandom");
                             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