Skip to content

Commit

Permalink
Fixed style, with apolgies to Russell
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Roach committed Mar 23, 2012
1 parent f63347b commit 16bca44
Showing 1 changed file with 2 additions and 6 deletions.
Expand Up @@ -199,7 +199,6 @@ public static final class Builder {
* @return a {@link HTTPClientConfig}
*/
public HTTPClientConfig build() {

String builderUrl = url;
if (builderUrl == null) {
StringBuilder sb = new StringBuilder(scheme).append("://").append(host).append(":").append(port);
Expand Down Expand Up @@ -236,16 +235,13 @@ public static Builder from(HTTPClientConfig copyConfig) {
// In order to allow you to change the host or port through the
// the builder when we're starting from an existing config,
// we need to parse them out (and not copy the existing url).
if (copyConfig.url != null)
{
if (copyConfig.url != null) {
Pattern p = Pattern.compile("//(.*):(\\d+)/");
Matcher m = p.matcher(copyConfig.url);
if (m.find())
{
if (m.find()) {
b.host = m.group(1);
b.port = Integer.parseInt(m.group(2));
}

}

return b;
Expand Down

0 comments on commit 16bca44

Please sign in to comment.