mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 22:44:12 +00:00
Fixed deprecated method in GRPC Java test.
Change-Id: Iccae8fe9409adbf3cd3013a5cf3368e068175ad3
This commit is contained in:
@@ -96,7 +96,7 @@ public class JavaGrpcTest {
|
|||||||
if (monster.hp() > maxHp.get()) {
|
if (monster.hp() > maxHp.get()) {
|
||||||
// Found a monster of higher hit points.
|
// Found a monster of higher hit points.
|
||||||
maxHp.set(monster.hp());
|
maxHp.set(monster.hp());
|
||||||
maxHpMonsterName.set(monster.name());
|
maxHpMonsterName.set(monster.name());
|
||||||
maxHpCount.set(1);
|
maxHpCount.set(1);
|
||||||
}
|
}
|
||||||
else if (monster.hp() == maxHp.get()) {
|
else if (monster.hp() == maxHp.get()) {
|
||||||
@@ -141,7 +141,7 @@ public class JavaGrpcTest {
|
|||||||
channel = ManagedChannelBuilder.forAddress("localhost", port)
|
channel = ManagedChannelBuilder.forAddress("localhost", port)
|
||||||
// Channels are secure by default (via SSL/TLS). For the example we disable TLS to avoid
|
// Channels are secure by default (via SSL/TLS). For the example we disable TLS to avoid
|
||||||
// needing certificates.
|
// needing certificates.
|
||||||
.usePlaintext(true)
|
.usePlaintext()
|
||||||
.directExecutor()
|
.directExecutor()
|
||||||
.build();
|
.build();
|
||||||
blockingStub = MonsterStorageGrpc.newBlockingStub(channel);
|
blockingStub = MonsterStorageGrpc.newBlockingStub(channel);
|
||||||
@@ -177,7 +177,7 @@ public class JavaGrpcTest {
|
|||||||
final CountDownLatch streamAlive = new CountDownLatch(1);
|
final CountDownLatch streamAlive = new CountDownLatch(1);
|
||||||
|
|
||||||
StreamObserver<Stat> statObserver = new StreamObserver<Stat>() {
|
StreamObserver<Stat> statObserver = new StreamObserver<Stat>() {
|
||||||
public void onCompleted() {
|
public void onCompleted() {
|
||||||
streamAlive.countDown();
|
streamAlive.countDown();
|
||||||
}
|
}
|
||||||
public void onError(Throwable ex) { }
|
public void onError(Throwable ex) { }
|
||||||
|
|||||||
Reference in New Issue
Block a user