From 645bb24c6ce7b1d85379aaeb4204c059d0c5624d Mon Sep 17 00:00:00 2001 From: Jakob Buchgraber Date: Thu, 28 Apr 2016 17:12:14 +0200 Subject: [PATCH] Add private constructor to Contexts and mark statusFromCancelled experimental. Fixes #1737 and #1736. (#1738) --- core/src/main/java/io/grpc/Contexts.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/io/grpc/Contexts.java b/core/src/main/java/io/grpc/Contexts.java index 3b05470219..48f730da07 100644 --- a/core/src/main/java/io/grpc/Contexts.java +++ b/core/src/main/java/io/grpc/Contexts.java @@ -40,6 +40,9 @@ import java.util.concurrent.TimeoutException; */ public class Contexts { + private Contexts() { + } + /** * Make the provided {@link Context} {@link Context#current()} for the creation of a listener * to a received call and for all events received by that listener. @@ -139,6 +142,7 @@ public class Contexts { * Returns the {@link Status} of a cancelled context or {@code null} if the context * is not cancelled. */ + @ExperimentalApi("https://github.com/grpc/grpc-java/issues/1737") public static Status statusFromCancelled(Context context) { Preconditions.checkNotNull(context, "context must not be null"); if (!context.isCancelled()) {