> +
> +import com.google.common.base.Supplier;
> +import com.google.gson.JsonObject;
> +import com.google.gson.JsonParser;
> +
> +/*
> + * Provides an easy way to pass in credentials using the json-key format.
> + * Just provide the path to the .json file and this extracts and sets 
> identity
> + *  and credentials from the json.
> + */
> +public class GoogleComputeEngineCredentialSupplierFromJson implements 
> Supplier<Credentials>{
> +
> +   private Credentials creds;
> +
> +   private GoogleComputeEngineCredentialSupplierFromJson(String jsonString){
> +      creds = parseJsonKeyString(jsonString);

Defer the parsing of the json String to the `get` method, to properly implement 
the Supplier contract.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/124/files#r23723223

Reply via email to