This is an automated email from the ASF dual-hosted git repository.
HTHou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 9348cb8e2fb Refactor Duplicate literal (#17632)
9348cb8e2fb is described below
commit 9348cb8e2fb4e5e5c2ff14ddbaeb4e9f9a5db768
Author: Anukalp Pandey <[email protected]>
AuthorDate: Tue May 12 07:18:43 2026 +0530
Refactor Duplicate literal (#17632)
---
.../main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java
b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java
index 69ac5fbb56f..6c5f73df6e7 100644
---
a/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java
+++
b/iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java
@@ -99,6 +99,7 @@ public class TElasticFramedTransport extends TTransport {
protected AutoScalingBufferWriteTransport writeBuffer;
protected final byte[] i32buf = new byte[4];
private final boolean copyBinary;
+ private static final String FROM = " from ";
@Override
public boolean isOpen() {
@@ -164,7 +165,7 @@ public class TElasticFramedTransport extends TTransport {
"You may be sending non-SSL requests"
+ "%s to the SSL-enabled Thrift-RPC port, please confirm
that you are "
+ "using the right configuration",
- remoteAddress == null ? "" : " from " + remoteAddress));
+ remoteAddress == null ? "" : FROM + remoteAddress));
}
throw e;
}
@@ -209,7 +210,7 @@ public class TElasticFramedTransport extends TTransport {
if (underlying instanceof TSocket) {
remoteAddress = ((TSocket)
underlying).getSocket().getRemoteSocketAddress();
}
- String remoteInfo = (remoteAddress == null) ? "" : " from " +
remoteAddress;
+ String remoteInfo = (remoteAddress == null) ? "" : FROM + remoteAddress;
close();
error.throwException(size, remoteInfo, thriftMaxFrameSize);
@@ -289,7 +290,7 @@ public class TElasticFramedTransport extends TTransport {
if (underlying instanceof TSocket) {
remoteAddress = ((TSocket)
underlying).getSocket().getRemoteSocketAddress();
}
- String remoteInfo = (remoteAddress == null) ? "" : " from " +
remoteAddress;
+ String remoteInfo = (remoteAddress == null) ? "" : FROM + remoteAddress;
close();
FrameError.STRING_LENGTH_EXCEEDED.throwException(numBytes, remoteInfo,
thriftMaxFrameSize);
}