Author: sebb Date: Fri Dec 5 15:36:29 2008 New Revision: 723926 URL: http://svn.apache.org/viewvc?rev=723926&view=rev Log: Need to override SocketFactory#createSocket() because Java 1.6 uses that rather than any of the createSocket(...) methods with parameters. This avoids the error: java.net.SocketException: Unconnected sockets not implemented
Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/HttpSSLProtocolSocketFactory.java jakarta/jmeter/trunk/xdocs/changes.xml Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/HttpSSLProtocolSocketFactory.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/HttpSSLProtocolSocketFactory.java?rev=723926&r1=723925&r2=723926&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/HttpSSLProtocolSocketFactory.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/util/HttpSSLProtocolSocketFactory.java Fri Dec 5 15:36:29 2008 @@ -47,14 +47,10 @@ private static final Logger log = LoggingManager.getLoggerForClass(); - private JsseSSLManager sslManager; + private final JsseSSLManager sslManager; private final int CPS; // Characters per second to emulate - private HttpSSLProtocolSocketFactory(){ - CPS=0; - } - public HttpSSLProtocolSocketFactory(JsseSSLManager sslManager) { super(); this.sslManager = sslManager; @@ -180,6 +176,16 @@ } /** + * @see javax.net.SocketFactory#createSocket() + */ + public Socket createSocket() throws IOException, UnknownHostException { + SSLSocketFactory sslfac = getSSLSocketFactory(); + Socket sock = sslfac.createSocket(); + setSocket(sock); + return wrapSocket(sock); + } + + /** * @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean) */ public Socket createSocket( Modified: jakarta/jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=723926&r1=723925&r2=723926&view=diff ============================================================================== --- jakarta/jmeter/trunk/xdocs/changes.xml (original) +++ jakarta/jmeter/trunk/xdocs/changes.xml Fri Dec 5 15:36:29 2008 @@ -167,6 +167,7 @@ <li>Add HeaderAsPropertyRenderer to support header resource names; use this to fix locale changes in various GUI elements</li> <li>Fixed language change handling for menus (does not yet work for TestBeans)</li> <li>Fix regex function - was failing to process $m$mid$n$ correctly</li> +<li>Fix Java 1.6 https error: java.net.SocketException: Unconnected sockets not implemented</li> </ul> <h3>Improvements</h3> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]