Removed unnecessary socket class check

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@722283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2008-12-01 23:24:07 +00:00
parent 59b1f4047d
commit a412fd3bc8
1 changed files with 0 additions and 7 deletions

View File

@ -140,13 +140,6 @@ public final class PlainSocketFactory implements SocketFactory {
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()) {