Skip to content

Commit 1199740

Browse files
committed
Add java.util.UUID to trusted classes in Jackson serializer
This class is safe to deserialize according to Jackson: https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/SubTypeValidator.java This also has been checked against Jackson 2.11 to confirm the backport of this enhancement to 4.3.x. Resolves #4110
1 parent 6c09e95 commit 1199740

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008-2021 the original author or authors.
2+
* Copyright 2008-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -254,6 +254,7 @@ protected TypeIdResolver idResolver(MapperConfig<?> config,
254254
*/
255255
static class TrustedTypeIdResolver implements TypeIdResolver {
256256
private static final Set<String> TRUSTED_CLASS_NAMES = Collections.unmodifiableSet(new HashSet(Arrays.asList(
257+
"java.util.UUID",
257258
"java.util.ArrayList",
258259
"java.util.Arrays$ArrayList",
259260
"java.util.LinkedList",

0 commit comments

Comments
 (0)