Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.19.0
-
None
-
Unknown
Description
All RestProducerFactory implementations use code similar to:
String url; if (uriTemplate != null) { // http is already prefixed in base path url = String.format("%s/%s/%s", host, basePath, uriTemplate); } else { // http is already prefixed in base path url = String.format("%s/%s", host, basePath); }
This fails to account for basePath being null or empty, and uriTemplate being empty, which results in the resulting url to either have double slashes (e.g. http://host//uriTemplate) or "null" String in url (e.g. http://host/null/uriTemplate).