From 4de2026492718abd715f2aec67ffb3e3fc9d347a Mon Sep 17 00:00:00 2001 From: ejona Date: Fri, 16 Jan 2015 16:17:35 -0800 Subject: [PATCH] Fix TODO attribution ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=84172357 --- .../google/net/stubby/auth/OAuth2ChannelInterceptor.java | 2 +- compiler/src/java_generator.cc | 2 +- core/src/main/java/com/google/net/stubby/Call.java | 2 +- core/src/main/java/com/google/net/stubby/Channel.java | 2 +- core/src/main/java/com/google/net/stubby/ChannelImpl.java | 6 +++--- core/src/main/java/com/google/net/stubby/Marshaller.java | 2 +- core/src/main/java/com/google/net/stubby/Metadata.java | 2 +- .../java/com/google/net/stubby/SerializingExecutor.java | 2 +- core/src/main/java/com/google/net/stubby/ServerCall.java | 2 +- core/src/main/java/com/google/net/stubby/ServerImpl.java | 6 +++--- .../google/net/stubby/transport/AbstractServerStream.java | 6 +++--- .../com/google/net/stubby/transport/AbstractStream.java | 2 +- .../com/google/net/stubby/transport/ClientTransport.java | 2 +- .../com/google/net/stubby/transport/MessageFramer.java | 2 +- .../google/net/stubby/transport/TransportFrameUtil.java | 4 ++-- .../java/com/google/net/stubby/examples/MathClient.java | 2 +- .../java/com/google/net/stubby/examples/MathServer.java | 4 ++-- .../net/stubby/testing/integration/TestServiceImpl.java | 2 +- .../net/stubby/transport/netty/NettyClientHandler.java | 4 ++-- .../net/stubby/transport/netty/NettyClientTransport.java | 2 +- .../google/net/stubby/transport/netty/NettyServer.java | 2 +- .../stubby/transport/netty/NettyClientHandlerTest.java | 2 +- .../net/stubby/transport/okhttp/OkHttpClientStream.java | 2 +- .../stubby/transport/okhttp/OkHttpClientTransport.java | 4 ++-- .../java/com/google/net/stubby/stub/AbstractStub.java | 2 +- stub/src/main/java/com/google/net/stubby/stub/Calls.java | 8 ++++---- .../java/com/google/net/stubby/stub/StreamObserver.java | 2 +- 27 files changed, 40 insertions(+), 40 deletions(-) diff --git a/auth/src/main/java/com/google/net/stubby/auth/OAuth2ChannelInterceptor.java b/auth/src/main/java/com/google/net/stubby/auth/OAuth2ChannelInterceptor.java index 939ca2f2bb..c0c6a38642 100644 --- a/auth/src/main/java/com/google/net/stubby/auth/OAuth2ChannelInterceptor.java +++ b/auth/src/main/java/com/google/net/stubby/auth/OAuth2ChannelInterceptor.java @@ -64,7 +64,7 @@ public class OAuth2ChannelInterceptor implements ClientInterceptor { @Override public Call interceptCall(MethodDescriptor method, Channel next) { - // TODO(user): If the call fails for Auth reasons, this does not properly propagate info that + // TODO(ejona): If the call fails for Auth reasons, this does not properly propagate info that // would be in WWW-Authenticate, because it does not yet have access to the header. return new ForwardingCall(next.newCall(method)) { @Override diff --git a/compiler/src/java_generator.cc b/compiler/src/java_generator.cc index fb522679c0..43ea5a028f 100644 --- a/compiler/src/java_generator.cc +++ b/compiler/src/java_generator.cc @@ -337,7 +337,7 @@ static void PrintStub(const google::protobuf::ServiceDescriptor* service, p->Print("public "); switch (call_type) { case BLOCKING_CALL: - // TODO(user): decide the blocking server interface + // TODO(zhangkun): decide the blocking server interface CHECK(type != BLOCKING_SERVER_INTERFACE) << "Blocking server interface is not available"; CHECK(!client_streaming) diff --git a/core/src/main/java/com/google/net/stubby/Call.java b/core/src/main/java/com/google/net/stubby/Call.java index 3f08119c37..b8f6986897 100644 --- a/core/src/main/java/com/google/net/stubby/Call.java +++ b/core/src/main/java/com/google/net/stubby/Call.java @@ -94,7 +94,7 @@ public abstract class Call { * @param headers which can contain extra information like authentication. * @throws IllegalStateException if call is already started */ - // TODO(user): Might be better to put into Channel#newCall, might reduce decoration burden + // TODO(lryan): Might be better to put into Channel#newCall, might reduce decoration burden public abstract void start(Listener responseListener, Metadata.Headers headers); /** diff --git a/core/src/main/java/com/google/net/stubby/Channel.java b/core/src/main/java/com/google/net/stubby/Channel.java index 24569908cb..19cc935fc7 100644 --- a/core/src/main/java/com/google/net/stubby/Channel.java +++ b/core/src/main/java/com/google/net/stubby/Channel.java @@ -44,6 +44,6 @@ public interface Channel { /** * Create a call to the given service method. */ - // TODO(user): perform start() as part of new Call creation? + // TODO(ejona): perform start() as part of new Call creation? public Call newCall(MethodDescriptor method); } diff --git a/core/src/main/java/com/google/net/stubby/ChannelImpl.java b/core/src/main/java/com/google/net/stubby/ChannelImpl.java index 600b5d84a8..839d16da69 100644 --- a/core/src/main/java/com/google/net/stubby/ChannelImpl.java +++ b/core/src/main/java/com/google/net/stubby/ChannelImpl.java @@ -94,7 +94,7 @@ public final class ChannelImpl implements Channel { } /** Hack to allow executors to auto-shutdown. Not for general use. */ - // TODO(user): Replace with a real API. + // TODO(ejona): Replace with a real API. void setTerminationRunnable(Runnable runnable) { this.terminationRunnable = runnable; } @@ -125,7 +125,7 @@ public final class ChannelImpl implements Channel { * *

NOT YET IMPLEMENTED. This method currently behaves identically to shutdown(). */ - // TODO(user): cancel preexisting calls. + // TODO(ejona): cancel preexisting calls. public synchronized ChannelImpl shutdownNow() { shutdown(); return this; @@ -263,7 +263,7 @@ public final class ChannelImpl implements Channel { stream = transport.newStream(method, headers, listener); } catch (IllegalStateException ex) { // We can race with the transport and end up trying to use a terminated transport. - // TODO(user): Improve the API to remove the possibility of the race. + // TODO(ejona): Improve the API to remove the possibility of the race. stream = new NoopClientStream(); listener.closed(Status.fromThrowable(ex), new Metadata.Trailers()); return; diff --git a/core/src/main/java/com/google/net/stubby/Marshaller.java b/core/src/main/java/com/google/net/stubby/Marshaller.java index f7d8293ecc..12c8166cf4 100644 --- a/core/src/main/java/com/google/net/stubby/Marshaller.java +++ b/core/src/main/java/com/google/net/stubby/Marshaller.java @@ -41,7 +41,7 @@ public interface Marshaller { /** * Given a message produce an {@link InputStream} for it. */ - // TODO(user): Switch to ByteSource equivalent when ready + // TODO(lryan): Switch to ByteSource equivalent when ready public InputStream stream(T value); /** diff --git a/core/src/main/java/com/google/net/stubby/Metadata.java b/core/src/main/java/com/google/net/stubby/Metadata.java index 0a22b0353b..6883adb247 100644 --- a/core/src/main/java/com/google/net/stubby/Metadata.java +++ b/core/src/main/java/com/google/net/stubby/Metadata.java @@ -104,7 +104,7 @@ public abstract class Metadata { /** * Constructor called by the transport layer when it receives binary metadata. */ - // TODO(user): Convert to use ByteString so we can cache transformations + // TODO(lryan): Convert to use ByteString so we can cache transformations private Metadata(byte[]... binaryValues) { store = LinkedListMultimap.create(); for (int i = 0; i < binaryValues.length; i++) { diff --git a/core/src/main/java/com/google/net/stubby/SerializingExecutor.java b/core/src/main/java/com/google/net/stubby/SerializingExecutor.java index 68040cd405..d70a217aa9 100644 --- a/core/src/main/java/com/google/net/stubby/SerializingExecutor.java +++ b/core/src/main/java/com/google/net/stubby/SerializingExecutor.java @@ -49,7 +49,7 @@ import javax.annotation.concurrent.GuardedBy; * @author JJ Furman */ -// TODO(user): figure out a way to not expose it or move it to transport package. +// TODO(simonma): figure out a way to not expose it or move it to transport package. public final class SerializingExecutor implements Executor { private static final Logger log = Logger.getLogger(SerializingExecutor.class.getName()); diff --git a/core/src/main/java/com/google/net/stubby/ServerCall.java b/core/src/main/java/com/google/net/stubby/ServerCall.java index 9742a27d03..e9253493cd 100644 --- a/core/src/main/java/com/google/net/stubby/ServerCall.java +++ b/core/src/main/java/com/google/net/stubby/ServerCall.java @@ -59,7 +59,7 @@ public abstract class ServerCall { *

Implementations are free to block for extended periods of time. Implementations are not * required to be thread-safe. */ - // TODO(user): We need to decide what to do in the case of server closing with non-cancellation + // TODO(ejona): We need to decide what to do in the case of server closing with non-cancellation // before client half closes. It may be that we treat such a case as an error. If we permit such // a case then we either get to generate a half close or purposefully omit it. public abstract static class Listener { diff --git a/core/src/main/java/com/google/net/stubby/ServerImpl.java b/core/src/main/java/com/google/net/stubby/ServerImpl.java index cad6a32936..f7cd2e9a9f 100644 --- a/core/src/main/java/com/google/net/stubby/ServerImpl.java +++ b/core/src/main/java/com/google/net/stubby/ServerImpl.java @@ -221,7 +221,7 @@ public class ServerImpl extends AbstractService implements Server { @Override public void failed(Service.State from, Throwable failure) { - // TODO(user): Ideally we would want to force-stop transports before notifying application of + // TODO(ejona): Ideally we would want to force-stop transports before notifying application of // failure, but that would cause us to have an unrepresentative state since we would be // RUNNING but not accepting connections. notifyFailed(failure); @@ -285,7 +285,7 @@ public class ServerImpl extends AbstractService implements Server { /** Never returns {@code null}. */ private ServerStreamListener startCall(ServerStream stream, String fullMethodName, ServerMethodDefinition methodDef, Metadata.Headers headers) { - // TODO(user): should we update fullMethodName to have the canonical path of the method? + // TODO(ejona): should we update fullMethodName to have the canonical path of the method? final ServerCallImpl call = new ServerCallImpl(stream, methodDef); ServerCall.Listener listener = methodDef.getServerCallHandler().startCall(fullMethodName, call, headers); @@ -344,7 +344,7 @@ public class ServerImpl extends AbstractService implements Server { * Like {@link ServerCall#close(Status, Metadata.Trailers)}, but thread-safe for internal use. */ private void internalClose(Status status, Metadata.Trailers trailers) { - // TODO(user): this is not thread-safe :) + // TODO(ejona): this is not thread-safe :) stream.close(status, trailers); } diff --git a/core/src/main/java/com/google/net/stubby/transport/AbstractServerStream.java b/core/src/main/java/com/google/net/stubby/transport/AbstractServerStream.java index 838d70a238..7dd1b53dce 100644 --- a/core/src/main/java/com/google/net/stubby/transport/AbstractServerStream.java +++ b/core/src/main/java/com/google/net/stubby/transport/AbstractServerStream.java @@ -128,7 +128,7 @@ public abstract class AbstractServerStream extends AbstractStream frame.close(); return; } - // TODO(user): It sounds sub-optimal to deframe in the network thread. That means + // TODO(zhangkun): It sounds sub-optimal to deframe in the network thread. That means // decompression is serialized. deframe(frame, endOfStream); } @@ -213,7 +213,7 @@ public abstract class AbstractServerStream extends AbstractStream * about stream closure and send the status */ public final void abortStream(Status status, boolean notifyClient) { - // TODO(user): Investigate whether we can remove the notification to the client + // TODO(lryan): Investigate whether we can remove the notification to the client // and rely on a transport layer stream reset instead. Preconditions.checkArgument(!status.isOk(), "status must not be OK"); if (!listenerClosed) { @@ -221,7 +221,7 @@ public abstract class AbstractServerStream extends AbstractStream listener.closed(status); } if (notifyClient) { - // TODO(user): Remove + // TODO(lryan): Remove if (stashedTrailers == null) { stashedTrailers = new Metadata.Trailers(); } diff --git a/core/src/main/java/com/google/net/stubby/transport/AbstractStream.java b/core/src/main/java/com/google/net/stubby/transport/AbstractStream.java index 06c1c8d81e..bed0372cf6 100644 --- a/core/src/main/java/com/google/net/stubby/transport/AbstractStream.java +++ b/core/src/main/java/com/google/net/stubby/transport/AbstractStream.java @@ -147,7 +147,7 @@ public abstract class AbstractStream implements Stream { framer.writePayload(message, length); } - // TODO(user): add flow control. + // TODO(nathanmittler): add flow control. if (accepted != null) { accepted.run(); } diff --git a/core/src/main/java/com/google/net/stubby/transport/ClientTransport.java b/core/src/main/java/com/google/net/stubby/transport/ClientTransport.java index 657e11d887..09cb5bc395 100644 --- a/core/src/main/java/com/google/net/stubby/transport/ClientTransport.java +++ b/core/src/main/java/com/google/net/stubby/transport/ClientTransport.java @@ -47,7 +47,7 @@ public interface ClientTransport extends Service { /** * Creates a new stream for sending messages to the remote end-point. If the service is already * stopped, throws an {@link IllegalStateException}. - * TODO(user): Consider also throwing for stopping. + * TODO(nathanmittler): Consider also throwing for stopping. *

* This method returns immediately and does not wait for any validation of the request. If * creation fails for any reason, {@link ClientStreamListener#closed} will be called to provide diff --git a/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java b/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java index 5ff5d7e423..66647de41c 100644 --- a/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java +++ b/core/src/main/java/com/google/net/stubby/transport/MessageFramer.java @@ -194,7 +194,7 @@ public class MessageFramer { * closed or disposed, additional calls to this method will have no affect. */ public void dispose() { - // TODO(user): Returning buffer to a pool would go here + // TODO(lryan): Returning buffer to a pool would go here bytebuf = null; } diff --git a/core/src/main/java/com/google/net/stubby/transport/TransportFrameUtil.java b/core/src/main/java/com/google/net/stubby/transport/TransportFrameUtil.java index 80d1c23f87..0f3d96e6e3 100644 --- a/core/src/main/java/com/google/net/stubby/transport/TransportFrameUtil.java +++ b/core/src/main/java/com/google/net/stubby/transport/TransportFrameUtil.java @@ -55,7 +55,7 @@ public final class TransportFrameUtil { private static final byte[] binaryHeaderSuffixBytes = Metadata.BINARY_HEADER_SUFFIX.getBytes(US_ASCII); - // TODO(user): This needs proper namespacing support, this is currently just a hack + // TODO(lryan): This needs proper namespacing support, this is currently just a hack /** * Converts the path from the HTTP request to the full qualified method name. * @@ -88,7 +88,7 @@ public final class TransportFrameUtil { } else { // Non-binary header. // Filter out headers that contain non-spec-compliant ASCII characters. - // TODO(user): only do such check in development mode since it's expensive + // TODO(zhangkun): only do such check in development mode since it's expensive if (isSpecCompliantAscii(value)) { result.add(key); result.add(value); diff --git a/examples/src/main/java/com/google/net/stubby/examples/MathClient.java b/examples/src/main/java/com/google/net/stubby/examples/MathClient.java index ad5997127c..aa4c7d86ad 100644 --- a/examples/src/main/java/com/google/net/stubby/examples/MathClient.java +++ b/examples/src/main/java/com/google/net/stubby/examples/MathClient.java @@ -217,7 +217,7 @@ public class MathClient { *

The asynchronous usage is similar to {@link #divMany}. */ public void blockingFib() { - // TODO(user): Support "send until cancel". Currently, client application can not + // TODO(simonma): Support "send until cancel". Currently, client application can not // cancel a server streaming call. int limit = rand.nextInt(20) + 10; logger.info("*** Blocking Fib, print the first " + limit + " fibonacci numbers."); diff --git a/examples/src/main/java/com/google/net/stubby/examples/MathServer.java b/examples/src/main/java/com/google/net/stubby/examples/MathServer.java index d2dd92a774..8d71d35d53 100644 --- a/examples/src/main/java/com/google/net/stubby/examples/MathServer.java +++ b/examples/src/main/java/com/google/net/stubby/examples/MathServer.java @@ -61,7 +61,7 @@ public class MathServer { .addService(CalcGrpc.bindService(new CalcService())) .buildAndWaitForRunning(); logger.info("Server started, listening on " + port); - // TODO(user): gRPC server should register JVM shutdown hook to shutdown itself, remove this + // TODO(simonma): gRPC server should register JVM shutdown hook to shutdown itself, remove this // after we support that. Runtime.getRuntime().addShutdownHook(new Thread() { @Override @@ -131,7 +131,7 @@ public class MathServer { public void fib(FibArgs request, StreamObserver responseObserver) { int limit = (int) request.getLimit(); if (limit <= 0) { - // TODO(user): Support "send until cancel". Currently, client application can not + // TODO(simonma): Support "send until cancel". Currently, client application can not // cancel a server streaming call. return; } diff --git a/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java b/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java index 8c1f75ac9c..60996fa017 100644 --- a/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java +++ b/integration-testing/src/main/java/com/google/net/stubby/testing/integration/TestServiceImpl.java @@ -93,7 +93,7 @@ public class TestServiceImpl implements TestServiceGrpc.TestService { boolean compressable = compressableResponse(req.getResponseType()); ByteString dataBuffer = compressable ? compressableBuffer : uncompressableBuffer; // For consistency with the c++ TestServiceImpl, use a random offset for unary calls. - // TODO(user): whether or not this is a good approach needs further discussion. + // TODO(wonderfly): whether or not this is a good approach needs further discussion. int offset = random.nextInt( compressable ? compressableBuffer.size() : uncompressableBuffer.size()); ByteString payload = generatePayload(dataBuffer, offset, req.getResponseSize()); diff --git a/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientHandler.java b/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientHandler.java index b28b39353c..9cd20ecab9 100644 --- a/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientHandler.java +++ b/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientHandler.java @@ -178,7 +178,7 @@ class NettyClientHandler extends Http2ConnectionHandler { */ private void onRstStreamRead(int streamId) throws Http2Exception { - // TODO(user): do something with errorCode? + // TODO(nathanmittler): do something with errorCode? Http2Stream http2Stream = connection().requireStream(streamId); NettyClientStream stream = clientStream(http2Stream); stream.transportReportStatus(Status.UNKNOWN, false, new Metadata.Trailers()); @@ -318,7 +318,7 @@ class NettyClientHandler extends Http2ConnectionHandler { if (streamId <= 0) { // The HTTP/2 connection has exhausted its stream IDs. Permanently fail all stream creation // attempts for this transport. - // TODO(user): send GO_AWAY? + // TODO(nathanmittler): send GO_AWAY? failPendingStreams(goAwayStatus); return; } diff --git a/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientTransport.java b/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientTransport.java index 45b6556946..9f3de126bb 100644 --- a/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientTransport.java +++ b/netty/src/main/java/com/google/net/stubby/transport/netty/NettyClientTransport.java @@ -127,7 +127,7 @@ class NettyClientTransport extends AbstractClientTransport { throw new RuntimeException(ex); } } - // TODO(user): specify allocator. The method currently ignores it though. + // TODO(ejona): specify allocator. The method currently ignores it though. SSLEngine sslEngine = sslContext.newEngine(null, inetAddress.getHostString(), inetAddress.getPort()); SSLParameters sslParams = new SSLParameters(); diff --git a/netty/src/main/java/com/google/net/stubby/transport/netty/NettyServer.java b/netty/src/main/java/com/google/net/stubby/transport/netty/NettyServer.java index 5ac958d980..7ac1eb5334 100644 --- a/netty/src/main/java/com/google/net/stubby/transport/netty/NettyServer.java +++ b/netty/src/main/java/com/google/net/stubby/transport/netty/NettyServer.java @@ -80,7 +80,7 @@ public class NettyServer extends AbstractService { public void initChannel(Channel ch) throws Exception { NettyServerTransport transport = new NettyServerTransport(ch, serverListener, sslContext); transport.startAsync(); - // TODO(user): Should we wait for transport shutdown before shutting down server? + // TODO(nathanmittler): Should we wait for transport shutdown before shutting down server? } }; this.bossGroup = bossGroup; diff --git a/netty/src/test/java/com/google/net/stubby/transport/netty/NettyClientHandlerTest.java b/netty/src/test/java/com/google/net/stubby/transport/netty/NettyClientHandlerTest.java index 8378e3a091..615443f847 100644 --- a/netty/src/test/java/com/google/net/stubby/transport/netty/NettyClientHandlerTest.java +++ b/netty/src/test/java/com/google/net/stubby/transport/netty/NettyClientHandlerTest.java @@ -88,7 +88,7 @@ public class NettyClientHandlerTest extends NettyHandlerTestBase { private NettyClientHandler handler; - // TODO(user): mocking concrete classes is not safe. Consider making NettyClientStream an + // TODO(zhangkun): mocking concrete classes is not safe. Consider making NettyClientStream an // interface. @Mock private NettyClientStream stream; diff --git a/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientStream.java b/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientStream.java index 0e9ad77c8c..0c5baa199b 100644 --- a/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientStream.java +++ b/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientStream.java @@ -132,7 +132,7 @@ class OkHttpClientStream extends Http2ClientStream { Preconditions.checkState(id() != 0, "streamId should be set"); okio.Buffer buffer = new okio.Buffer(); // Read the data into a buffer. - // TODO(user): swap to NIO buffers or zero-copy if/when okhttp/okio supports it + // TODO(simonma): swap to NIO buffers or zero-copy if/when okhttp/okio supports it buffer.write(frame.array(), frame.arrayOffset(), frame.remaining()); // Write the data to the remote endpoint. // Per http2 SPEC, the max data length should be larger than 64K, while our frame size is diff --git a/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientTransport.java b/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientTransport.java index 9ce0633b3c..83ccc802bb 100644 --- a/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientTransport.java +++ b/okhttp/src/main/java/com/google/net/stubby/transport/okhttp/OkHttpClientTransport.java @@ -448,13 +448,13 @@ public class OkHttpClientTransport extends AbstractClientTransport { @Override public void priority(int streamId, int streamDependency, int weight, boolean exclusive) { // Ignore priority change. - // TODO(user): log + // TODO(simonma): log } @Override public void alternateService(int streamId, String origin, ByteString protocol, String host, int port, long maxAge) { - // TODO(user): Deal with alternateService propagation + // TODO(simonma): Deal with alternateService propagation } } diff --git a/stub/src/main/java/com/google/net/stubby/stub/AbstractStub.java b/stub/src/main/java/com/google/net/stubby/stub/AbstractStub.java index 017e50e36e..6a39889da1 100644 --- a/stub/src/main/java/com/google/net/stubby/stub/AbstractStub.java +++ b/stub/src/main/java/com/google/net/stubby/stub/AbstractStub.java @@ -48,7 +48,7 @@ import java.util.concurrent.TimeUnit; * @param the concrete type of this stub. * @param the service descriptor type */ -// TODO(user): Move into 3rd party when tidy +// TODO(lryan): Move into 3rd party when tidy // TODO(lryan/kevinb): Excessive parameterization can be a pain, try to eliminate once the generated // code is more tangible. public abstract class AbstractStub, diff --git a/stub/src/main/java/com/google/net/stubby/stub/Calls.java b/stub/src/main/java/com/google/net/stubby/stub/Calls.java index fd2105f0f8..279e8408f2 100644 --- a/stub/src/main/java/com/google/net/stubby/stub/Calls.java +++ b/stub/src/main/java/com/google/net/stubby/stub/Calls.java @@ -65,7 +65,7 @@ public class Calls { */ public static MethodDescriptor createMethodDescriptor( String fullServiceName, Method method) { - // TODO(user): if timeout is not defined in proto file, use a default timeout here. + // TODO(zhangkun): if timeout is not defined in proto file, use a default timeout here. // If timeout is defined in proto file, Method should carry the timeout. return MethodDescriptor.create(method.getType(), fullServiceName + "/" + method.getName(), 1, TimeUnit.SECONDS, method.getRequestMarshaller(), method.getResponseMarshaller()); @@ -144,7 +144,7 @@ public class Calls { * response stream. * @return an iterator over the response stream. */ - // TODO(user): Not clear if we want to use this idiom for 'simple' stubs. + // TODO(lryan): Not clear if we want to use this idiom for 'simple' stubs. public static Iterator blockingServerStreamingCall( Call call, ReqT param) { BlockingResponseStream result = new BlockingResponseStream(); @@ -238,7 +238,7 @@ public class Calls { @Override public void onError(Throwable t) { - // TODO(user): log? + // TODO(ejona): log? call.cancel(); } @@ -325,7 +325,7 @@ public class Calls { *

The class is not thread-safe, but it does permit Call.Listener calls in a separate thread * from Iterator calls. */ - // TODO(user): determine how to allow Call.cancel() in case of application error. + // TODO(ejona): determine how to allow Call.cancel() in case of application error. private static class BlockingResponseStream implements Iterator { private final LinkedBlockingQueue buffer = new LinkedBlockingQueue(); private final Call.Listener listener = new QueuingListener(); diff --git a/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java b/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java index be075297ac..7f5a3c8d43 100644 --- a/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java +++ b/stub/src/main/java/com/google/net/stubby/stub/StreamObserver.java @@ -37,7 +37,7 @@ package com.google.net.stubby.stub; *

Implementations are expected to be thread-compatible. Separate StreamObservers do not need to * be sychronized together; incoming and outgoing directions are independent. */ -// TODO(user): Consider whether we need to interact with flow-control at this layer. E.g. +// TODO(lryan): Consider whether we need to interact with flow-control at this layer. E.g. // public ListenableFuture onValue(V value). Do we layer it in here or as an additional // interface? Interaction with flow control can be done by blocking here. public interface StreamObserver {