On Fri, 2018-07-13 at 13:03 -0600, Gary Gregory wrote:
> Hi All,
> 
> I just had to port this 'nice' fluent code:
> 
>             final String uri = new URIBuilder()
>                 .setScheme(scheme)
>                 .setHost("localhost")
>                 .setUserInfo(userInfo)
>                 .setPort(proxyPort)
>                 .setPath(path)
>                 .setCustomQuery(queryParameterString)
>                 .build()
>                 .toString();
> 
> to:
> 
>             final URIBuilder builder = new URIBuilder()
>                 .setScheme(scheme)
>                 .setHost("localhost")
>                 .setPort(proxyPort)
>                 .setPath(path)
>                 .setCustomQuery(queryParameterString);
>             if (StringUtils.isNotBlank(userInfo)) {
>                 builder.setUserInfo(userInfo);
>             }
>             final String uri = builder.build().toString();
> 
> To avoid an IllegalArgumentException when userInfo is "":

Corrected with

https://git1-us-west.apache.org/repos/asf?p=httpcomponents-core.git;a=commit;h=c4342118

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to