Merge pull request #77 from gongxuanzhang/main

Util classes should have private constructors
This commit is contained in:
valarchie
2024-12-31 14:26:28 +08:00
committed by GitHub

View File

@@ -82,6 +82,10 @@ public class JacksonUtil {
}
}
private JacksonUtil() {
throw new IllegalStateException("Utility class JacksonUtil can not be instantiated");
}
public static ObjectMapper initMapper() {
JsonMapper.Builder builder = JsonMapper.builder()
.enable(JSON_READ_FEATURES_ENABLED.toArray(new JsonReadFeature[0]));