jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1828614 - in /jmeter/trunk/src/core/org/apache/jmeter/util: HostNameSetter.java SlowSSLSocket.java
Date Sat, 07 Apr 2018 19:50:06 GMT
Author: pmouawad
Date: Sat Apr  7 19:50:06 2018
New Revision: 1828614

URL: http://svn.apache.org/viewvc?rev=1828614&view=rev
Log:
Bug 58757: Fix deprecated methods of HTTPCLIENT after migration to httpclient-4.5.X
Drop useless code
Bugzilla Id: 58757

Removed:
    jmeter/trunk/src/core/org/apache/jmeter/util/HostNameSetter.java
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/SlowSSLSocket.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/SlowSSLSocket.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/SlowSSLSocket.java?rev=1828614&r1=1828613&r2=1828614&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/SlowSSLSocket.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/SlowSSLSocket.java Sat Apr  7 19:50:06 2018
@@ -22,7 +22,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.InetAddress;
-import java.net.InetSocketAddress;
 import java.net.SocketAddress;
 import java.net.SocketException;
 import java.nio.channels.SocketChannel;
@@ -40,7 +39,7 @@ import javax.net.ssl.SSLSocket;
  */
 public class SlowSSLSocket extends SSLSocket {
 
-    private final int CPS; // Characters per second to emulate
+    private final int charactersPerSecond; // Characters per second to emulate
 
     private final SSLSocket sslSock; // Save the actual socket
 
@@ -54,19 +53,19 @@ public class SlowSSLSocket extends SSLSo
             throw new IllegalArgumentException("Speed (cps) <= 0");
         }
         sslSock=sock;
-        CPS=cps;
+        charactersPerSecond=cps;
     }
 
     // Override so we can intercept the stream
     @Override
     public OutputStream getOutputStream() throws IOException {
-        return new SlowOutputStream(sslSock.getOutputStream(), CPS);
+        return new SlowOutputStream(sslSock.getOutputStream(), charactersPerSecond);
     }
 
     // Override so we can intercept the stream
     @Override
     public InputStream getInputStream() throws IOException {
-        return new SlowInputStream(sslSock.getInputStream(), CPS);
+        return new SlowInputStream(sslSock.getInputStream(), charactersPerSecond);
     }
 
     // Forward all the SSLSocket methods to the input socket
@@ -175,12 +174,6 @@ public class SlowSSLSocket extends SSLSo
 
     @Override
     public void connect(SocketAddress endpoint, int timeout) throws IOException {
-        // see Bug 59902
-        if(endpoint instanceof InetSocketAddress) {
-            InetSocketAddress address = 
-                    (InetSocketAddress) endpoint;
-            HostNameSetter.setServerNameIndication(address.getHostString(), sslSock);
-        }
         sslSock.connect(endpoint, timeout);
     }
 



Mime
View raw message