From afdbe19937a7fe30fae2a03256616ecca9941b23 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Thu, 23 Jul 2015 10:50:02 -0700 Subject: [PATCH] Minor fixes/improvements Cancel was the only method for implementing ClientStream that was not final, even though it isn't really any different from the other methods. --- .../src/main/java/io/grpc/transport/AbstractClientStream.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/io/grpc/transport/AbstractClientStream.java b/core/src/main/java/io/grpc/transport/AbstractClientStream.java index 459bc78c47..63455ccdba 100644 --- a/core/src/main/java/io/grpc/transport/AbstractClientStream.java +++ b/core/src/main/java/io/grpc/transport/AbstractClientStream.java @@ -168,7 +168,7 @@ public abstract class AbstractClientStream extends AbstractStream protected void inboundTrailersReceived(Metadata.Trailers trailers, Status status) { Preconditions.checkNotNull(trailers, "trailers"); if (inboundPhase() == Phase.STATUS) { - log.log(Level.INFO, "Received trailers on closed stream {0}\n {1}\n {3}", + log.log(Level.INFO, "Received trailers on closed stream {0}\n {1}\n {2}", new Object[]{id(), status, trailers}); } // Stash the status & trailers so they can be delivered by the deframer calls @@ -281,7 +281,7 @@ public abstract class AbstractClientStream extends AbstractStream * Cancel the stream. Called by the application layer, never called by the transport. */ @Override - public void cancel(Status reason) { + public final void cancel(Status reason) { Preconditions.checkArgument(EnumSet.of(CANCELLED, DEADLINE_EXCEEDED).contains(reason.getCode()), "Invalid cancellation reason"); outboundPhase(Phase.STATUS);