> + T payload = (T) obj;
> +
> + return createRequest(request, createPayload(payload));
> + }
> +
> + @Override
> + public <R extends HttpRequest> R bindToRequest(R request, Object input) {
> + throw new UnsupportedOperationException("Not supported yet.");
> + }
> +
> + protected abstract String createPayload(T payload);
> +
> + protected String ifNotEmpty(String pattern, Object param) {
> + try {
> + return Strings.isNullOrEmpty((String) param) ? "" :
> String.format(pattern, param);
> + } catch (ClassCastException ex) {
It should be safe to always use the "toString" method and you could remove this
ugly try/catch.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/72/files#r22133613