Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/ExperimentalApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@
/**
* Context information such as links to discussion thread, tracking issue etc.
*/
String value() default "";
String value();
}
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/Metadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public <T> Iterable<T> removeAll(Key<T> key) {
* Remove all values for the given key without returning them. This is a minor performance
* optimization if you do not need the previous values.
*/
@ExperimentalApi
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4691")
public <T> void discardAll(Key<T> key) {
if (isEmpty()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/SecurityLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/**
* The level of security guarantee in communications.
*/
@ExperimentalApi
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4692")
public enum SecurityLevel {
/**
* No security guarantee.
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/io/grpc/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ public static Status fromThrowable(Throwable t) {
*
* @return the trailers or {@code null} if not found.
*/
@ExperimentalApi
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4683")
public static Metadata trailersFromThrowable(Throwable t) {
Throwable cause = checkNotNull(t, "t");
while (cause != null) {
Expand Down
12 changes: 11 additions & 1 deletion core/src/main/java/io/grpc/StatusException.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,20 @@ public class StatusException extends Exception {
private final Status status;
private final Metadata trailers;

/**
* Constructs an exception with both a status. See also {@link Status#asException()}.
*
* @since 1.0.0
*/
public StatusException(Status status) {
this(status, null);
}

/**
* Constructs an exception with both a status and trailers. See also
* {@link Status#asException(Metadata)}.
*
* @since 1.0.0
*/
public StatusException(Status status, @Nullable Metadata trailers) {
super(Status.formatThrowableMessage(status), status.getCause());
Expand All @@ -44,15 +51,18 @@ public StatusException(Status status, @Nullable Metadata trailers) {

/**
* Returns the status code as a {@link Status} object.
*
* @since 1.0.0
*/
public final Status getStatus() {
return status;
}

/**
* Returns the received trailers.
*
* @since 1.0.0
*/
@ExperimentalApi
public final Metadata getTrailers() {
return trailers;
}
Expand Down
12 changes: 11 additions & 1 deletion core/src/main/java/io/grpc/StatusRuntimeException.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,20 @@ public class StatusRuntimeException extends RuntimeException {
private final Status status;
private final Metadata trailers;

/**
* Constructs the exception with both a status. See also {@link Status#asException()}.
*
* @since 1.0.0
*/
public StatusRuntimeException(Status status) {
this(status, null);
}

/**
* Constructs the exception with both a status and trailers. See also
* {@link Status#asException(Metadata)}.
*
* @since 1.0.0
*/
public StatusRuntimeException(Status status, @Nullable Metadata trailers) {
super(Status.formatThrowableMessage(status), status.getCause());
Expand All @@ -45,15 +52,18 @@ public StatusRuntimeException(Status status, @Nullable Metadata trailers) {

/**
* Returns the status code as a {@link Status} object.
*
* @since 1.0.0
*/
public final Status getStatus() {
return status;
}

/**
* Returns the received trailers.
*
* @since 1.0.0
*/
@ExperimentalApi
public final Metadata getTrailers() {
return trailers;
}
Expand Down
2 changes: 1 addition & 1 deletion protobuf/src/main/java/io/grpc/protobuf/StatusProto.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import javax.annotation.Nullable;

/** Utility methods for working with {@link com.google.rpc.Status}. */
@ExperimentalApi
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4695")
public final class StatusProto {
private StatusProto() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* {@link #getHealthService()} method.
* The health status manager can update the health statuses of the server.
*/
@io.grpc.ExperimentalApi
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/4696")
public final class HealthStatusManager {

private final HealthServiceImpl healthService;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* Specialization of {@link StreamObserver} implemented by clients in order to interact with the
* advanced features of a call such as flow-control.
*/
@ExperimentalApi
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4693")
public interface ClientResponseObserver<ReqT, RespT> extends StreamObserver<RespT> {
/**
* Called by the runtime priot to the start of a call to provide a reference to the
Expand Down
2 changes: 1 addition & 1 deletion stub/src/main/java/io/grpc/stub/StreamObservers.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* Utility functions for working with {@link StreamObserver} and it's common subclasses like
* {@link CallStreamObserver}.
*/
@ExperimentalApi
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/4694")
public final class StreamObservers {
/**
* Copy the values of an {@link Iterator} to the target {@link CallStreamObserver} while properly
Expand Down