Skip to content

Cache.get(Object key, Class<T> type) should be more explicit about what to do in case of a type mismatch [SPR-12145] #16759

Closed
@spring-projects-issues

Description

@spring-projects-issues

Oliver Drotbohm opened SPR-12145 and commented

The indicated method is pretty clear about the expected behavior for a variety of cases except a value being found with a non matching type. Implementations consistently throw IllegalStateException so it might be worthwhile to make this the official exception to be thrown in that case.


Affects: 4.0.6

Referenced from: commits 72d62a7, 2f93759

Backported to: 4.0.7

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions