Skip to content

Introduce general purpose isEmpty() method in ObjectUtils [SPR-13119] #17710

@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-13119 and commented

Status Quo

Currently, there are several isEmpty() methods scattered across various utilities within Spring such as ObjectUtils, CollectionUtils, and StringUtils; however, each of these methods typically requires a cast to the type supported for that particular variant. Consequently, there is no general purpose catch-all isEmpty() method for checking whether an object is empty without knowing its concrete type.

Deliverables

  1. Introduce a general-purpose isEmpty(Object) method in ObjectUtils that supports multiple object types in a central location and transparently delegates to existing functionality in ObjectUtils, CollectionUtils, and StringUtils.

Referenced from: commits 05de9a8

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions