You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2013/08/27 23:28:53 UTC

svn commit: r1518001 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java

Author: sebb
Date: Tue Aug 27 21:28:53 2013
New Revision: 1518001

URL: http://svn.apache.org/r1518001
Log:
Localise variable definitions

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=1518001&r1=1518000&r2=1518001&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Tue Aug 27 21:28:53 2013
@@ -284,15 +284,12 @@ public class Proxy extends Thread {
             InputStream in = getCertificate();
             Exception except = null;
             if (in != null) {
-                KeyStore ks = null;
-                KeyManagerFactory kmf = null;
-                SSLContext sslcontext = null;
                 try {
-                    ks = KeyStore.getInstance(KEYSTORE_TYPE);
+                    KeyStore ks = KeyStore.getInstance(KEYSTORE_TYPE);
                     ks.load(in, JMeterUtils.getPropDefault("proxy.cert.keystorepass", DEFAULT_PASSWORD).toCharArray()); // $NON-NLS-1$
-                    kmf = KeyManagerFactory.getInstance(KEYMANAGERFACTORY);
+                    KeyManagerFactory kmf = KeyManagerFactory.getInstance(KEYMANAGERFACTORY);
                     kmf.init(ks, JMeterUtils.getPropDefault("proxy.cert.keypassword", DEFAULT_PASSWORD).toCharArray()); // $NON-NLS-1$
-                    sslcontext = SSLContext.getInstance(SSLCONTEXT_PROTOCOL);
+                    SSLContext sslcontext = SSLContext.getInstance(SSLCONTEXT_PROTOCOL);
                     sslcontext.init(kmf.getKeyManagers(), null, null);
                     SSLSocketFactory sslFactory = sslcontext.getSocketFactory();
                     hashHost.put(host, sslFactory);