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] [Softlayer] Implements setting and retrieving the notes property (#756)
Date Wed, 03 Jun 2015 00:02:49 GMT
> + * The string is set into the payload of the HttpRequest
> + * 
> + */
> +@Singleton
> +public class NotesToJson implements Binder {
> +
> +   private final Json json;
> +
> +   @Inject
> +   public NotesToJson(Json json) {
> +      this.json = checkNotNull(json, "json");
> +   }
> +
> +   @Override
> +   public <R extends HttpRequest> R bindToRequest(R request, Object input) {
> +      checkArgument(input instanceof String);

Is `null` an instance of a String? Consider doing the null check first.

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