Skip to content

Commit 2915d7e

Browse files
aardappelLuckyRu
authored andcommitted
Fixed deprecated method in GRPC Java test.
Change-Id: Iccae8fe9409adbf3cd3013a5cf3368e068175ad3
1 parent 0800883 commit 2915d7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grpc/tests/JavaGrpcTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void onNext(Monster monster) {
9696
if (monster.hp() > maxHp.get()) {
9797
// Found a monster of higher hit points.
9898
maxHp.set(monster.hp());
99-
maxHpMonsterName.set(monster.name());
99+
maxHpMonsterName.set(monster.name());
100100
maxHpCount.set(1);
101101
}
102102
else if (monster.hp() == maxHp.get()) {
@@ -141,7 +141,7 @@ public static void startServer() throws IOException {
141141
channel = ManagedChannelBuilder.forAddress("localhost", port)
142142
// Channels are secure by default (via SSL/TLS). For the example we disable TLS to avoid
143143
// needing certificates.
144-
.usePlaintext(true)
144+
.usePlaintext()
145145
.directExecutor()
146146
.build();
147147
blockingStub = MonsterStorageGrpc.newBlockingStub(channel);
@@ -177,7 +177,7 @@ public void testClientStreaming() throws IOException, InterruptedException {
177177
final CountDownLatch streamAlive = new CountDownLatch(1);
178178

179179
StreamObserver<Stat> statObserver = new StreamObserver<Stat>() {
180-
public void onCompleted() {
180+
public void onCompleted() {
181181
streamAlive.countDown();
182182
}
183183
public void onError(Throwable ex) { }

0 commit comments

Comments
 (0)