hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1172650 - /httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/SSLTestContexts.java
Date Mon, 19 Sep 2011 14:52:55 GMT
Author: sebb
Date: Mon Sep 19 14:52:55 2011
New Revision: 1172650

URL: http://svn.apache.org/viewvc?rev=1172650&view=rev
Log:
Better info than NPE

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/SSLTestContexts.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/SSLTestContexts.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/SSLTestContexts.java?rev=1172650&r1=1172649&r2=1172650&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/SSLTestContexts.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/test/java/org/apache/http/SSLTestContexts.java
Mon Sep 19 14:52:55 2011
@@ -37,6 +37,8 @@ import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
 
+import junit.framework.Assert;
+
 public class SSLTestContexts {
 
     private static KeyManagerFactory createKeyManagerFactory() throws NoSuchAlgorithmException
{
@@ -51,6 +53,7 @@ public class SSLTestContexts {
     public static SSLContext createServerSSLContext() throws Exception {
         ClassLoader cl = SSLTestContexts.class.getClassLoader();
         URL url = cl.getResource("test.keystore");
+        Assert.assertNotNull("Keystore URL should not be null", url);
         KeyStore keystore  = KeyStore.getInstance("jks");
         keystore.load(url.openStream(), "nopassword".toCharArray());
         KeyManagerFactory kmfactory = createKeyManagerFactory();



Mime
View raw message