Skip to content

Commit

Permalink
use PropertyNamingStrategy's static field instead of new its subclass
Browse files Browse the repository at this point in the history
bypass the potential deadlock when PropertyNamingStrategy class initialization
see: FasterXML/jackson-databind#2715
  • Loading branch information
fangwentong committed May 9, 2020
1 parent affeaf5 commit ad90151
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy.PascalCaseStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.ksc.KscServiceException;
import com.ksc.annotation.SdkInternalApi;
import com.ksc.annotation.ThreadSafe;
Expand All @@ -34,7 +34,7 @@ public class JsonErrorUnmarshaller extends AbstractErrorUnmarshaller<JsonNode> {

private static final ObjectMapper MAPPER = new ObjectMapper().configure(
DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false).setPropertyNamingStrategy(
new PascalCaseStrategy());
PropertyNamingStrategy.PASCAL_CASE_TO_CAMEL_CASE);

private final String handledErrorCode;

Expand Down

0 comments on commit ad90151

Please sign in to comment.