minhkte / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

GoogleClientSecrets javadoc fix #886

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The javadoc for 
com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets contains an 
incorrect example, i.e.

 Sample usage:

  static GoogleClientSecrets loadClientSecretsResource(JsonFactory jsonFactory) throws IOException {
    return GoogleClientSecrets.load(
        jsonFactory, SampleClass.class.getResourceAsStream("/client_secrets.json"));
  }

http://javadoc.google-api-java-client.googlecode.com/hg/1.18.0-rc/com/google/api
/client/googleapis/auth/oauth2/GoogleClientSecrets.html

There are no load method signatures that accept an InputStream, only one that 
accepts a java.io.Reader.  Thus the example should be

  static GoogleClientSecrets loadClientSecretsResource(JsonFactory jsonFactory) throws IOException {
    return GoogleClientSecrets.load(
        jsonFactory, new InputStreamReader(SampleClass.class.getResourceAsStream("/client_secrets.json")));
  }

Original issue reported on code.google.com by heue...@gmail.com on 23 Jun 2014 at 10:42

GoogleCodeExporter commented 9 years ago

Original comment by wonder...@google.com on 23 Jun 2014 at 10:49

GoogleCodeExporter commented 9 years ago
It's fixed in the 1.19.0 Javadoc.

http://javadoc.google-api-java-client.googlecode.com/hg/1.19.0/index.html

Original comment by wonder...@google.com on 14 Sep 2014 at 6:24