Skip to content

Commit 42aeac2

Browse files
CopilotMat001
andcommitted
Replace deprecated PropertyNamingStrategy with PropertyNamingStrategies
Co-authored-by: Mat001 <1386553+Mat001@users.noreply.github.com>
1 parent 6b084e8 commit 42aeac2

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

core-api/src/main/java/com/optimizely/ab/event/internal/serializer/JacksonSerializer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
*
3-
* Copyright 2016-2017, 2019, Optimizely and contributors
3+
* Copyright 2016-2017, 2019, 2025, Optimizely and contributors
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -19,13 +19,13 @@
1919
import com.fasterxml.jackson.annotation.JsonInclude;
2020
import com.fasterxml.jackson.core.JsonProcessingException;
2121
import com.fasterxml.jackson.databind.ObjectMapper;
22-
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
22+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
2323

2424
class JacksonSerializer implements Serializer {
2525

2626
private ObjectMapper mapper =
2727
new ObjectMapper().setPropertyNamingStrategy(
28-
PropertyNamingStrategy.SNAKE_CASE);
28+
PropertyNamingStrategies.SNAKE_CASE);
2929

3030
public <T> String serialize(T payload) {
3131
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);

core-api/src/test/java/com/optimizely/ab/event/internal/serializer/JacksonSerializerTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
*
3-
* Copyright 2016-2017, 2019, Optimizely and contributors
3+
* Copyright 2016-2017, 2019, 2025, Optimizely and contributors
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
1818

1919
import com.fasterxml.jackson.databind.ObjectMapper;
2020

21-
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
21+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
2222
import com.optimizely.ab.event.internal.payload.EventBatch;
2323

2424
import org.junit.Test;
@@ -42,7 +42,7 @@ public class JacksonSerializerTest {
4242
private JacksonSerializer serializer = new JacksonSerializer();
4343
private ObjectMapper mapper =
4444
new ObjectMapper().setPropertyNamingStrategy(
45-
PropertyNamingStrategy.SNAKE_CASE);
45+
PropertyNamingStrategies.SNAKE_CASE);
4646

4747

4848
@Test

0 commit comments

Comments
 (0)