Skip to content

Commit

Permalink
Remove Deprecated Jackson Property Naming Strategy
Browse files Browse the repository at this point in the history
`PropertyNamingStrategy` is
[deprecated](FasterXML/jackson-databind#2715)
due to the possibility of class loading deadlock. This change simply
switches to the recommended `PropertyNamingStrategies` equivalent.
  • Loading branch information
ledbutter committed Jun 21, 2024
1 parent e3a69d4 commit 6cdc71b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import org.apache.iceberg.rest.RESTSerializers;

public class RESTObjectMapper {
Expand All @@ -42,7 +42,7 @@ public static ObjectMapper mapper() {
if (!isInitialized) {
MAPPER.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
MAPPER.setPropertyNamingStrategy(new PropertyNamingStrategy.KebabCaseStrategy());
MAPPER.setPropertyNamingStrategy(new PropertyNamingStrategies.KebabCaseStrategy());
RESTSerializers.registerAll(MAPPER);
isInitialized = true;
}
Expand Down

0 comments on commit 6cdc71b

Please sign in to comment.