|
19 | 19 | import com.amazonaws.services.lambda.runtime.serialization.PojoSerializer; |
20 | 20 | import com.amazonaws.services.lambda.runtime.serialization.util.ReflectUtil; |
21 | 21 | import com.amazonaws.services.lambda.runtime.serialization.util.SerializeUtil; |
| 22 | +import com.fasterxml.jackson.databind.PropertyNamingStrategies; |
22 | 23 | import com.fasterxml.jackson.databind.PropertyNamingStrategy; |
23 | 24 | import com.amazonaws.services.lambda.runtime.serialization.events.modules.DateModule; |
24 | 25 | import com.amazonaws.services.lambda.runtime.serialization.events.modules.DateTimeModule; |
@@ -91,7 +92,7 @@ public class LambdaEventSerializers { |
91 | 92 | new SimpleEntry<>("com.amazonaws.services.s3.event.S3EventNotification", new S3EventSerializer<>()), |
92 | 93 | new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.models.s3.S3EventNotification", new S3EventSerializer<>()), |
93 | 94 | 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())); |
95 | 96 |
|
96 | 97 | /** |
97 | 98 | * Maps supported event classes to mixin classes with Jackson annotations. |
@@ -153,7 +154,7 @@ public class LambdaEventSerializers { |
153 | 154 | SQSEventMixin.class), |
154 | 155 | new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.SQSEvent$SQSMessage", |
155 | 156 | SQSEventMixin.SQSMessageMixin.class)) |
156 | | - .collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue)); |
| 157 | + .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); |
157 | 158 |
|
158 | 159 | /** |
159 | 160 | * 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 { |
208 | 209 | new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.SQSEvent", |
209 | 210 | Arrays.asList( |
210 | 211 | 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())); |
212 | 213 |
|
213 | 214 | /** |
214 | 215 | * If event requires a naming strategy. For example, when someone names the getter method getSNS and the setter |
215 | 216 | * method setSns, for some magical reasons, using both mixins and a naming strategy works |
216 | 217 | */ |
217 | 218 | private static final Map<String, PropertyNamingStrategy> NAMING_STRATEGY_MAP = Stream.of( |
218 | 219 | new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.SNSEvent", |
219 | | - new PropertyNamingStrategy.PascalCaseStrategy()), |
| 220 | + new PropertyNamingStrategies.UpperCamelCaseStrategy()), |
220 | 221 | new SimpleEntry<>("com.amazonaws.services.lambda.runtime.events.ConnectEvent$Queue", |
221 | | - new PropertyNamingStrategy.PascalCaseStrategy()) |
| 222 | + new PropertyNamingStrategies.UpperCamelCaseStrategy()) |
222 | 223 | ) |
223 | | - .collect(Collectors.toMap(SimpleEntry::getKey, SimpleEntry::getValue)); |
| 224 | + .collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); |
224 | 225 |
|
225 | 226 | /** |
226 | 227 | * Returns whether the class name is a Lambda supported event model. |
|
0 commit comments