GitHub user VampireAchao edited a comment on the discussion: StreamPark
code-style-and-quality Improve
Redundant string encoding
org.apache.streampark.console.base.domain.RestResponse
```java
// strings are extracted as constant references.
public static final String STATUS_SUCCESS = "success";
public static final String STATUS_FAIL = "error";
private static final long serialVersionUID = -8713837118340960775L;
public static RestResponse success(Object data) {
RestResponse resp = new RestResponse();
// strings not be extracted
resp.put("status", STATUS_SUCCESS);
resp.put("code", ResponseCode.CODE_SUCCESS);
resp.put("data", data);
return resp;
}
```
GitHub link:
https://github.com/apache/incubator-streampark/discussions/2915#discussioncomment-6623980
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]