refactor: 优化部分代码

移除所有 toString(),修复 Sonar、Codacy 扫描问题
This commit is contained in:
2024-02-03 10:43:32 +08:00
parent 5457bc21c3
commit 0e3d388eb7
30 changed files with 3 additions and 171 deletions

View File

@@ -99,9 +99,4 @@ public class CorsProperties {
public void setExposedHeaders(List<String> exposedHeaders) {
this.exposedHeaders = exposedHeaders;
}
@Override
public String toString() {
return "CorsProperties{" + "enabled=" + enabled + ", allowedOrigins=" + allowedOrigins + ", allowedMethods=" + allowedMethods + ", allowedHeaders=" + allowedHeaders + ", exposedHeaders=" + exposedHeaders + '}';
}
}

View File

@@ -81,9 +81,4 @@ public class TLogProperties {
public void setMdcEnable(Boolean mdcEnable) {
this.mdcEnable = mdcEnable;
}
@Override
public String toString() {
return "TLogProperties{" + "pattern='" + pattern + '\'' + ", enableInvokeTimePrint=" + enableInvokeTimePrint + ", idGenerator='" + idGenerator + '\'' + ", mdcEnable=" + mdcEnable + '}';
}
}

View File

@@ -57,10 +57,10 @@ public class TLogServletFilter implements Filter {
httpServletResponse.addHeader(headerName, TLogContext.getTraceId());
}
chain.doFilter(request, response);
return;
} finally {
TLogWebCommon.loadInstance().afterCompletion();
}
return;
}
chain.doFilter(request, response);
}

View File

@@ -68,9 +68,4 @@ public class TraceProperties {
public void setTlog(TLogProperties tlog) {
this.tlog = tlog;
}
@Override
public String toString() {
return "TraceProperties{" + "enabled=" + enabled + ", headerName='" + headerName + '\'' + ", tlog=" + tlog + '}';
}
}

View File

@@ -217,9 +217,4 @@ public class R<T> implements Serializable {
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
@Override
public String toString() {
return "R{" + "success=" + success + ", code=" + code + ", msg='" + msg + '\'' + ", data=" + data + ", timestamp=" + timestamp + '}';
}
}