Duplicating literal " from " 3 times.
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);
}
Hi @HTHou , I would like to work on this issue. Could you please assign this to me?
Thank you.
Hi @HTHou ,
I have raise pr regarding java:S1192, so can you please review and let me know that if there is any changes needed from my side.
I really appreciate your help and guidance.
Thank you
The PR is merged.
The PR is merged.
Thank you