jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ignasi Barrera <notificati...@github.com>
Subject Re: [jclouds-labs-openstack] Poppy service api (#179)
Date Fri, 06 Mar 2015 22:05:56 GMT
> + * Diff to create JSONPatch using dependency.
> + * Send the JSONPatch in the request.
> + *
> + * JSONPatch RFC:
> + * https://tools.ietf.org/html/rfc6902
> + */
> +public class JSONPatchUpdate implements MapBinder {
> +   @Inject
> +   private BindToJsonPayload jsonBinder;
> +
> +   @Override
> +   public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object>
postParams) {
> +      String jsonPatch = null;
> +      Service service = (Service) postParams.get("service");
> +
> +      Json json = Guice.createInjector(new GsonModule()).getInstance(Json.class);

Inject the Json object normally instead of creating a new entire injector.

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