jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Daggett <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] OS Ceilometer API support (#166)
Date Wed, 19 Nov 2014 14:47:25 GMT
> +   protected Gson gson;
> +
> +   @Inject
> +   public BindQueryRequestPayload() {
> +      gson = new GsonBuilder().disableHtmlEscaping().create();
> +   }
> +
> +   @Override
> +   public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object>
postParams) {
> +      Map<String, Object> map = Maps.newHashMap();
> +
> +      ComplexQueryOptions options = (ComplexQueryOptions)postParams.get("options");
> +
> +      if (options != null) {
> +
> +         if (!isNullOrEmptyString(options.getFilter())) {

Fortunately, there is a utility method `Strings.isNullOrEmpty(value)` that can be used here
instead. 

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/166/files#r20578452
Mime
View raw message