Skip to content

Commit ad90151

Browse files
committed
use PropertyNamingStrategy's static field instead of new its subclass
bypass the potential deadlock when PropertyNamingStrategy class initialization see: FasterXML/jackson-databind#2715
1 parent affeaf5 commit ad90151

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ksc-sdk-java-core/src/main/java/com/ksc/transform/JsonErrorUnmarshaller.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import com.fasterxml.jackson.databind.DeserializationFeature;
1818
import com.fasterxml.jackson.databind.JsonNode;
1919
import com.fasterxml.jackson.databind.ObjectMapper;
20-
import com.fasterxml.jackson.databind.PropertyNamingStrategy.PascalCaseStrategy;
20+
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
2121
import com.ksc.KscServiceException;
2222
import com.ksc.annotation.SdkInternalApi;
2323
import com.ksc.annotation.ThreadSafe;
@@ -34,7 +34,7 @@ public class JsonErrorUnmarshaller extends AbstractErrorUnmarshaller<JsonNode> {
3434

3535
private static final ObjectMapper MAPPER = new ObjectMapper().configure(
3636
DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false).setPropertyNamingStrategy(
37-
new PascalCaseStrategy());
37+
PropertyNamingStrategy.PASCAL_CASE_TO_CAMEL_CASE);
3838

3939
private final String handledErrorCode;
4040

0 commit comments

Comments
 (0)