Skip to content

Commit

Permalink
Remove usage of deprecated jackson-databind PropertyNamingStrategy.Sn…
Browse files Browse the repository at this point in the history
…akeCaseStrategy

This has been replaced by PropertyNamingStrategies.SnakeCaseStrategy due to a
possible classloader deadlock:
FasterXML/jackson-databind#2715
  • Loading branch information
rhowe committed Jan 3, 2021
1 parent 7154ca0 commit 8c7cb72
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.dropwizard.jackson;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.cfg.MapperConfig;
import com.fasterxml.jackson.databind.introspect.AnnotatedField;
Expand All @@ -9,18 +10,13 @@
/**
* A {@link PropertyNamingStrategy} implementation which, if the declaring class of a property is
* annotated with {@link JsonSnakeCase}, uses a
* {@link com.fasterxml.jackson.databind.PropertyNamingStrategy.SnakeCaseStrategy}, and uses
* {@link com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy}, and uses
* the default {@link PropertyNamingStrategy} otherwise.
*/
public class AnnotationSensitivePropertyNamingStrategy extends PropertyNamingStrategy {
private static final long serialVersionUID = -1372862028366311230L;

private final SnakeCaseStrategy snakeCase;

public AnnotationSensitivePropertyNamingStrategy() {
super();
this.snakeCase = new SnakeCaseStrategy();
}
private final PropertyNamingStrategy snakeCase = new PropertyNamingStrategies.SnakeCaseStrategy();

@Override
public String nameForConstructorParameter(MapperConfig<?> config,
Expand Down

0 comments on commit 8c7cb72

Please sign in to comment.