Skip to content

Commit d23ee24

Browse files
committed
no, now actual fix :)
1 parent db2f54e commit d23ee24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/tools/jackson/databind/cfg/MapperBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,8 @@ public B withAllCoercionConfigs(Consumer<CoercionConfigs> handler) {
10351035
*/
10361036
public B removeAllModules() {
10371037
_modules = null;
1038+
// [databind#5481]: invalidate cached state when modules are modified
1039+
_savedState = null;
10381040
return _this();
10391041
}
10401042

@@ -1066,6 +1068,8 @@ public B addModule(JacksonModule module)
10661068
_modules.putIfAbsent(dep.getRegistrationId(), dep);
10671069
}
10681070
_modules.put(moduleId, module);
1071+
// [databind#5481]: invalidate cached state when modules are modified
1072+
_savedState = null;
10691073
return _this();
10701074
}
10711075

0 commit comments

Comments
 (0)