schm cannot be null

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@652193 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2008-04-30 00:10:36 +00:00
parent 96405703fa
commit 41af181267
1 changed files with 0 additions and 10 deletions

View File

@ -120,11 +120,6 @@ public class DefaultClientConnectionOperator
} }
final Scheme schm = schemeRegistry.getScheme(target.getSchemeName()); final Scheme schm = schemeRegistry.getScheme(target.getSchemeName());
if (schm == null) {
throw new IllegalArgumentException
("Unknown scheme '" + target.getSchemeName() +
"' in target host.");
}
final SocketFactory sf = schm.getSocketFactory(); final SocketFactory sf = schm.getSocketFactory();
Socket sock = sf.createSocket(); Socket sock = sf.createSocket();
@ -169,11 +164,6 @@ public class DefaultClientConnectionOperator
} }
final Scheme schm = schemeRegistry.getScheme(target.getSchemeName()); final Scheme schm = schemeRegistry.getScheme(target.getSchemeName());
if (schm == null) {
throw new IllegalArgumentException
("Unknown scheme '" + target.getSchemeName() +
"' in target host.");
}
if (!(schm.getSocketFactory() instanceof LayeredSocketFactory)) { if (!(schm.getSocketFactory() instanceof LayeredSocketFactory)) {
throw new IllegalArgumentException throw new IllegalArgumentException
("Target scheme (" + schm.getName() + ("Target scheme (" + schm.getName() +