Skip to content

Commit aa70365

Browse files
authored
Cleanup (#15)
1 parent 9171d0e commit aa70365

File tree

4 files changed

+3
-16
lines changed

4 files changed

+3
-16
lines changed

codelabs/Getting_Started_with_gRPC_Java/complete/src/main/java/io/grpc/examples/routeguide/RouteGuideClient.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import java.io.IOException;
3131
import java.util.Iterator;
3232
import java.util.List;
33-
import java.util.Random;
3433
import java.util.concurrent.CountDownLatch;
3534
import java.util.concurrent.TimeUnit;
3635
import java.util.logging.Level;
@@ -44,9 +43,7 @@ public class RouteGuideClient {
4443

4544
private final RouteGuideBlockingStub blockingStub;
4645

47-
private Random random = new Random();
48-
49-
/** Construct client for accessing RouteGuide server using the existing channel. */
46+
/** Construct client stub for accessing RouteGuide server using the existing channel. */
5047
public RouteGuideClient(Channel channel) {
5148
blockingStub = RouteGuideGrpc.newBlockingStub(channel);
5249
}

codelabs/Getting_Started_with_gRPC_Java/complete/src/main/java/io/grpc/examples/routeguide/RouteGuideServer.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,8 @@
3232
import io.grpc.stub.StreamObserver;
3333
import java.io.IOException;
3434
import java.net.URL;
35-
import java.util.ArrayList;
3635
import java.util.Collection;
37-
import java.util.Collections;
38-
import java.util.List;
39-
import java.util.concurrent.ConcurrentHashMap;
40-
import java.util.concurrent.ConcurrentMap;
4136
import java.util.concurrent.TimeUnit;
42-
import java.util.logging.Level;
4337
import java.util.logging.Logger;
4438

4539
/**
@@ -104,7 +98,7 @@ private void blockUntilShutdown() throws InterruptedException {
10498
}
10599

106100
/**
107-
* Main method. This comment makes the linter happy.
101+
* Main method.
108102
*/
109103
public static void main(String[] args) throws Exception {
110104
RouteGuideServer server = new RouteGuideServer(8980);
@@ -128,7 +122,7 @@ private static class RouteGuideService extends RouteGuideGrpc.RouteGuideImplBase
128122
* Gets the {@link Feature} at the requested {@link Point}. If no feature at that location
129123
* exists, an unnamed feature is returned at the provided location.
130124
*
131-
* @param request the requested location for the feature.
125+
* @param request the specified location for the feature.
132126
* @param responseObserver the observer that will receive the feature at the requested point.
133127
*/
134128
@Override

codelabs/Getting_Started_with_gRPC_Java/start_here/src/main/java/io/grpc/examples/routeguide/RouteGuideClient.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import io.grpc.Status;
99
import io.grpc.StatusRuntimeException;
1010
import io.grpc.examples.routeguide.RouteGuideGrpc.RouteGuideBlockingStub;
11-
import io.grpc.examples.routeguide.RouteGuideGrpc.RouteGuideStub; // For Phase 2
12-
import io.grpc.stub.StreamObserver; // For Phase 2
1311
import java.io.IOException;
1412
import java.util.List;
1513
import java.util.concurrent.TimeUnit;

codelabs/Getting_Started_with_gRPC_Java/start_here/src/main/java/io/grpc/examples/routeguide/RouteGuideServer.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ public static void main(String[] args) throws Exception {
9898
*/
9999
private static class RouteGuideService extends RouteGuideGrpc.RouteGuideImplBase {
100100
private final Collection<Feature> features;
101-
private final ConcurrentMap<Point, List<RouteNote>> routeNotes =
102-
new ConcurrentHashMap<Point, List<RouteNote>>();
103101

104102
RouteGuideService(Collection<Feature> features) {
105103
this.features = features;

0 commit comments

Comments
 (0)