(improvement)(code) Replace e.printStackTrace() with logger.error. (#1156)

This commit is contained in:
lexluo09
2024-06-15 18:26:52 +08:00
committed by GitHub
parent b5cc450758
commit f2a12e56b7
9 changed files with 39 additions and 36 deletions

View File

@@ -3,8 +3,9 @@ package com.tencent.supersonic.common.util;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.Base64;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class MD5Util {
@@ -44,7 +45,7 @@ public class MD5Util {
}
}
} catch (Exception e) {
e.printStackTrace();
log.error("", e);
}
if (isUpper) {

View File

@@ -12,8 +12,9 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public class YamlUtils {
/**
@@ -30,7 +31,7 @@ public class YamlUtils {
try {
return mapper.readValue(yamlStr, clazz);
} catch (JsonProcessingException e) {
e.printStackTrace();
log.error("", e);
}
return null;
}
@@ -53,7 +54,7 @@ public class YamlUtils {
.replaceAll("\"false\"", "false")
.replaceAll("\"False\"", "false");
} catch (IOException e) {
e.printStackTrace();
log.error("", e);
}
return null;
}