Description
This PR fixes a SonarCloud, reports a violation of rule java:S1192, issue related to duplicated string literals in the TElastic Framed Transport module.
The string literal " from " was used multiple times. It has been replaced with a constant to improve maintainability and readability.
Sonar Issue
https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=17612&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true
Files modified:
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java
How to fix
- Introduced a constant FROM
- Replaced all occurrences of " from " with the constant
Example
private static final String ACTION = "action";
public void run() {
prepare(ACTION);
execute(ACTION);
release(ACTION);
}
Description
This PR fixes a SonarCloud, reports a violation of rule
java:S1192, issue related to duplicated string literals in the TElastic Framed Transport module.The string literal
" from "was used multiple times. It has been replaced with a constant to improve maintainability and readability.Sonar Issue
https://sonarcloud.io/project/issues?id=apache_iotdb&pullRequest=17612&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true
Files modified:
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.javaHow to fix
Example