Skip to content

Commit

Permalink
Merge pull request #1243 from mziccard/pubsub-snippets
Browse files Browse the repository at this point in the history
Add snippets to PubSub's javadoc, PubSubSnippets class and tests
  • Loading branch information
mziccard authored Sep 15, 2016
2 parents d504bb6 + e0dbb7e commit b0f734e
Show file tree
Hide file tree
Showing 5 changed files with 1,952 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public Sink updateSinkAsync(String sinkName, String datasetName)
public Sink getSink(String sinkName) {
// [START getSink]
Sink sink = logging.getSink(sinkName);
if (sink != null) {
if (sink == null) {
// sink was not found
}
// [END getSink]
Expand All @@ -151,7 +151,7 @@ public Sink getSinkAsync(String sinkName) throws ExecutionException, Interrupted
Future<Sink> future = logging.getSinkAsync(sinkName);
// ...
Sink sink = future.get();
if (sink != null) {
if (sink == null) {
// sink was not found
}
// [END getSinkAsync]
Expand Down Expand Up @@ -371,7 +371,7 @@ public Metric updateMetricAsync(String metricName)
public Metric getMetric(String metricName) {
// [START getMetric]
Metric metric = logging.getMetric(metricName);
if (metric != null) {
if (metric == null) {
// metric was not found
}
// [END getMetric]
Expand All @@ -388,7 +388,7 @@ public Metric getMetricAsync(String metricName) throws ExecutionException, Inter
Future<Metric> future = logging.getMetricAsync(metricName);
// ...
Metric metric = future.get();
if (metric != null) {
if (metric == null) {
// metric was not found
}
// [END getMetricAsync]
Expand Down
Loading

0 comments on commit b0f734e

Please sign in to comment.