You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2008/12/02 00:24:08 UTC
svn commit: r722283 -
/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
Author: olegk
Date: Mon Dec 1 15:24:07 2008
New Revision: 722283
URL: http://svn.apache.org/viewvc?rev=722283&view=rev
Log:
Removed unnecessary socket class check
Modified:
httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
Modified: httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java?rev=722283&r1=722282&r2=722283&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java (original)
+++ httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/conn/scheme/PlainSocketFactory.java Mon Dec 1 15:24:07 2008
@@ -140,13 +140,6 @@
if (sock == null) {
throw new IllegalArgumentException("Socket may not be null.");
}
- // This class check assumes that createSocket() calls the constructor
- // directly. If it was using javax.net.SocketFactory, we couldn't make
- // an assumption about the socket class here.
- if (sock.getClass() != Socket.class) {
- throw new IllegalArgumentException
- ("Socket not created by this factory.");
- }
// This check is performed last since it calls a method implemented
// by the argument object. getClass() is final in java.lang.Object.
if (sock.isClosed()) {