Return-Path: X-Original-To: apmail-hc-commits-archive@www.apache.org Delivered-To: apmail-hc-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0330B9D7D for ; Mon, 19 Sep 2011 14:53:17 +0000 (UTC) Received: (qmail 52912 invoked by uid 500); 19 Sep 2011 14:53:16 -0000 Delivered-To: apmail-hc-commits-archive@hc.apache.org Received: (qmail 52880 invoked by uid 500); 19 Sep 2011 14:53:16 -0000 Mailing-List: contact commits-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list commits@hc.apache.org Received: (qmail 52872 invoked by uid 99); 19 Sep 2011 14:53:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2011 14:53:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Sep 2011 14:53:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id A82E023889BB for ; Mon, 19 Sep 2011 14:52:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@hc.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20110919145255.A82E023889BB@eris.apache.org> 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();