Skip to content

Commit

Permalink
Fix deprecation warning by replacing SNAKE_CASE with PropertyNamingSt…
Browse files Browse the repository at this point in the history
…rategies.SNAKE_CASE.

The PropertyNamingStrategy.SNAKE_CASE constant has been deprecated in favor of PropertyNamingStrategies.SNAKE_CASE.
This commit updates the code to use the current, non-deprecated naming strategy, resolving the lint warning.
  • Loading branch information
google-labs-jules[bot] committed Jan 23, 2025
1 parent 76b1cc6 commit 0e75e73
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/spotify/github/jackson/Json.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

package com.spotify.github.jackson;

import static com.fasterxml.jackson.databind.PropertyNamingStrategy.SNAKE_CASE;
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import static java.util.Objects.isNull;

import com.fasterxml.jackson.annotation.JsonInclude;
Expand Down Expand Up @@ -248,6 +248,6 @@ private static class DefaultMapper {
.enable(SerializationFeature.WRITE_DATES_WITH_ZONE_ID)
.enable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES)
.setSerializationInclusion(JsonInclude.Include.NON_NULL)
.setPropertyNamingStrategy(SNAKE_CASE);
.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
}
}

0 comments on commit 0e75e73

Please sign in to comment.