Skip to content

Commit 8eaf053

Browse files
author
Davide Melfi
committed
chore: update jackson.version to 2.18.6
1 parent 3588a35 commit 8eaf053

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

aws-lambda-java-serialization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<maven.compiler.source>1.8</maven.compiler.source>
3333
<maven.compiler.target>1.8</maven.compiler.target>
3434
<relocation.prefix>com.amazonaws.lambda.thirdparty</relocation.prefix>
35-
<jackson.version>2.15.4</jackson.version>
35+
<jackson.version>2.18.6</jackson.version>
3636
<gson.version>2.10.1</gson.version>
3737
<json.version>20231013</json.version>
3838
<owasp.version>7.3.2</owasp.version>

aws-lambda-java-serialization/src/main/java/com/amazonaws/services/lambda/runtime/serialization/events/LambdaEventSerializers.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.amazonaws.services.lambda.runtime.serialization.PojoSerializer;
2020
import com.amazonaws.services.lambda.runtime.serialization.util.ReflectUtil;
2121
import com.amazonaws.services.lambda.runtime.serialization.util.SerializeUtil;
22+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
2223
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
2324
import com.amazonaws.services.lambda.runtime.serialization.events.modules.DateModule;
2425
import com.amazonaws.services.lambda.runtime.serialization.events.modules.DateTimeModule;
@@ -91,7 +92,7 @@ public class LambdaEventSerializers {
9192
new SimpleEntry<>("com.amazonaws.services.s3.event.S3EventNotification", new S3EventSerializer<>()),
9293
new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.models.s3.S3EventNotification", new S3EventSerializer<>()),
9394
new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.S3Event", new S3EventSerializer<>()))
94-
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
95+
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
9596

9697
/**
9798
* Maps supported event classes to mixin classes with Jackson annotations.
@@ -153,7 +154,7 @@ public class LambdaEventSerializers {
153154
SQSEventMixin.class),
154155
new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.SQSEvent$SQSMessage",
155156
SQSEventMixin.SQSMessageMixin.class))
156-
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
157+
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
157158

158159
/**
159160
* If mixins are required for inner classes of an event, then those nested classes must be specified here.
@@ -208,19 +209,19 @@ public class LambdaEventSerializers {
208209
new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.SQSEvent",
209210
Arrays.asList(
210211
new NestedClass("com.amazonaws.services.lambda.runtime.events.SQSEvent$SQSMessage"))))
211-
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
212+
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
212213

213214
/**
214215
* If event requires a naming strategy. For example, when someone names the getter method getSNS and the setter
215216
* method setSns, for some magical reasons, using both mixins and a naming strategy works
216217
*/
217218
private static final Map<String, PropertyNamingStrategy> NAMING_STRATEGY_MAP = Stream.of(
218219
new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.SNSEvent",
219-
new PropertyNamingStrategy.PascalCaseStrategy()),
220+
new PropertyNamingStrategies.UpperCamelCaseStrategy()),
220221
new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.ConnectEvent$Queue",
221-
new PropertyNamingStrategy.PascalCaseStrategy())
222+
new PropertyNamingStrategies.UpperCamelCaseStrategy())
222223
)
223-
.collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue));
224+
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
224225

225226
/**
226227
* Returns whether the class name is a Lambda supported event model.

0 commit comments

Comments
 (0)