You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/05/23 21:22:50 UTC

svn commit: r1485833 - /tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Author: markt
Date: Thu May 23 19:22:50 2013
New Revision: 1485833

URL: http://svn.apache.org/r1485833
Log:
Correctly init WebSocket to avoid NPE

Modified:
    tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java

Modified: tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java?rev=1485833&r1=1485832&r2=1485833&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/TestSsl.java Thu May 23 19:22:50 2013
@@ -35,6 +35,7 @@ import static org.junit.Assert.fail;
 
 import org.junit.Test;
 
+import org.apache.catalina.Context;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
 import org.apache.tomcat.util.buf.ByteChunk;
@@ -167,7 +168,9 @@ public class TestSsl extends TomcatBaseT
 
         File appDir = new File(getBuildDirectory(), "webapps/examples");
         // app dir is relative to server home
-        tomcat.addWebapp(null, "/examples", appDir.getAbsolutePath());
+        Context ctx = tomcat.addWebapp(null, "/examples",
+                appDir.getAbsolutePath());
+        ctx.addApplicationListener(WsListener.class.getName());
 
         TesterSupport.initSsl(tomcat);
 



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