This is an automated email from the ASF dual-hosted git repository.
engelen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-grpc.git
The following commit(s) were added to refs/heads/main by this push:
new 66b28aa6 java 17 instanceof (#515)
66b28aa6 is described below
commit 66b28aa6e651e3849dd9cb9a9cdf1da37e29479d
Author: PJ Fanning <[email protected]>
AuthorDate: Sun Sep 21 11:13:55 2025 +0100
java 17 instanceof (#515)
---
.../java/org/apache/pekko/grpc/benchmarks/qps/ClientConfiguration.java | 3 +--
.../java/org/apache/pekko/grpc/benchmarks/qps/ServerConfiguration.java | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git
a/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ClientConfiguration.java
b/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ClientConfiguration.java
index e2926f7b..7659b2dd 100644
---
a/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ClientConfiguration.java
+++
b/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ClientConfiguration.java
@@ -102,9 +102,8 @@ public class ClientConfiguration implements Configuration {
}
/*
- if (config.testca && config.address instanceof InetSocketAddress) {
+ if (config.testca && config.address instanceof InetSocketAddress
address) {
// Override the socket address with the host from the testca.
- InetSocketAddress address = (InetSocketAddress) config.address;
config.address = TestUtils.testServerAddress(address.getHostName(),
address.getPort());
}
diff --git
a/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ServerConfiguration.java
b/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ServerConfiguration.java
index a586aa4f..4069f3d3 100644
---
a/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ServerConfiguration.java
+++
b/benchmark-java/src/main/java/org/apache/pekko/grpc/benchmarks/qps/ServerConfiguration.java
@@ -128,8 +128,7 @@ class ServerConfiguration implements Configuration {
@Override
protected void setServerValue(ServerConfiguration config, String value) {
SocketAddress address = Utils.parseSocketAddress(value);
- if (address instanceof InetSocketAddress) {
- InetSocketAddress addr = (InetSocketAddress) address;
+ if (address instanceof InetSocketAddress addr) {
int port = addr.getPort() == 0 ? Utils.pickUnusedPort() :
addr.getPort();
// Re-create the address so that the server is available on all
local addresses.
address = new InetSocketAddress(port);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]