Skip to content

ConcurrentMapCache.putIfAbsent doesn't support null values [SPR-13458] #18038

@spring-projects-issues

Description

@spring-projects-issues

Mark Hale opened SPR-13458 and commented

The current code is

public ValueWrapper putIfAbsent(Object key, Object value) {
     Object existing = this.store.putIfAbsent(key, value);
     return toWrapper(existing);
}

but should be

public ValueWrapper putIfAbsent(Object key, Object value) {
     Object existing = this.store.putIfAbsent(key, toStoreValue(value));
     return toWrapper(existing);
}

Affects: 4.1.7, 4.2 GA, 4.2.1

Referenced from: commits df3c312, 4dee9cb

Backported to: 4.1.8

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions