对一大波idea提醒需要优化的地方进行处理

This commit is contained in:
handy
2023-11-23 16:25:59 +08:00
parent 8b1fb129ce
commit efa2538736
98 changed files with 195 additions and 289 deletions

View File

@@ -13,9 +13,9 @@ public enum PageFileSource {
PASTE_FILES(2, "页面粘贴的图片或文件"),
;
@Getter
private Integer source;
private final Integer source;
@Getter
private String desc;
private final String desc;
PageFileSource(Integer source, String desc) {
this.source = source;

View File

@@ -15,8 +15,8 @@ public enum SystemConfigEnum {
DOC_SYSTEM_VERSION("doc_system_version", "系统当前的版本号"),
;
private String key;
private String desc;
private final String key;
private final String desc;
SystemConfigEnum(String key, String desc) {
this.key = key;

View File

@@ -18,7 +18,7 @@ import java.util.Objects;
* @since 2018年8月21日
*/
public class DocResponseJson<T> implements ResponseJson<T> {
private static SerializeConfig mapping = new SerializeConfig();
private static final SerializeConfig mapping = new SerializeConfig();
static {
mapping.put(Date.class, new SimpleDateFormatSerializer("yyyy-MM-dd HH:mm:ss"));
@@ -134,7 +134,7 @@ public class DocResponseJson<T> implements ResponseJson<T> {
* @since 2018年8月7日
*/
public static <T> DocResponseJson<T> warn(String errMsg) {
return new DocResponseJson<T>(300, errMsg);
return new DocResponseJson<>(300, errMsg);
}
/**
@@ -145,7 +145,7 @@ public class DocResponseJson<T> implements ResponseJson<T> {
* @since 2018年8月7日
*/
public static <T> DocResponseJson<T> error(String errMsg) {
return new DocResponseJson<T>(500, errMsg);
return new DocResponseJson<>(500, errMsg);
}
/**
@@ -156,7 +156,7 @@ public class DocResponseJson<T> implements ResponseJson<T> {
* @since 2018年8月7日
*/
public static <T> DocResponseJson<T> failure(int errCode, String errMsg) {
return new DocResponseJson<T>(errCode, errMsg);
return new DocResponseJson<>(errCode, errMsg);
}
/**