The idp depends on apache httpclient, the library that supports a URLBuilder. All this code should be simplified with an instance of a URLBuilder.