diff --git a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java index cb66f767d98f..77f85f4b28fb 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java +++ b/google-cloud-clients/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MutateRowsAttemptCallable.java @@ -185,7 +185,8 @@ public Void call() { // Handle RPC level errors by wrapping them in a MutateRowsException ApiFuture> catching = - ApiFutures.catching(innerFuture, Throwable.class, attemptFailedCallback); + ApiFutures.catching( + innerFuture, Throwable.class, attemptFailedCallback, MoreExecutors.directExecutor()); // Inspect the results and either propagate the success, or prepare to retry the failed // mutations diff --git a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java index d8e7b00b0c4f..dca4efbc514e 100644 --- a/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java +++ b/google-cloud-clients/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/it/env/Emulator.java @@ -172,10 +172,8 @@ private void waitForPort(int port) throws InterruptedException, TimeoutException } private ManagedChannel createChannel(int port) { - // NOTE: usePlaintext is currently @ExperimentalAPI. In grpc 1.11 it be became parameterless. - // In 1.12 it should be stable. See https://github.com/grpc/grpc-java/issues/1772 for discussion return ManagedChannelBuilder.forAddress("localhost", port) - .usePlaintext(true) + .usePlaintext() .maxInboundMessageSize(256 * 1024 * 1024) .build(); } diff --git a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java b/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java index 141c99857da4..d08b14e71506 100644 --- a/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java +++ b/google-cloud-clients/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java @@ -349,7 +349,8 @@ private static String getActiveGoogleCloudConfig(File configDir) { String activeGoogleCloudConfig = null; try { activeGoogleCloudConfig = - Files.readFirstLine(new File(configDir, "active_config"), Charset.defaultCharset()); + Files.asCharSource(new File(configDir, "active_config"), Charset.defaultCharset()) + .readFirstLine(); } catch (IOException ex) { // ignore }