Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store non-empty bean names in ConcurrentMapCacheFactoryBean #33578

Closed
wants to merge 1 commit into from

Conversation

dukbong
Copy link
Contributor

@dukbong dukbong commented Sep 23, 2024

Typically, there are no bean names composed solely of whitespace, so the parameter for this method should be a meaningful value. To ensure the accuracy of that value, it seems more appropriate to use hasText rather than hasLength.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 23, 2024
@sbrannen sbrannen added the in: core Issues in core modules (aop, beans, core, context, expression) label Sep 23, 2024
@sbrannen sbrannen changed the title Empty bean names composed solely of whitespace are undesirable and must be meaningful values. Store non-empty bean names in ConcurrentMapCacheFactoryBean Sep 23, 2024
@sbrannen
Copy link
Member

Hi @dukbong,

Typically, there are no bean names composed solely of whitespace, so the parameter for this method should be a meaningful value.

Indeed, it is unlikely (or at least undesirable) to have a bean name composed solely of whitespace; however, this check is not meant to guard against that scenario.

Rather, we only intend to ensure the bean/cache name is non-null and has length (because "" is already the default for the cache name).

In light of that, we will leave this hasLength check as-is.

Thanks anyway for the PR.

@sbrannen sbrannen closed this Sep 23, 2024
@sbrannen sbrannen self-assigned this Sep 23, 2024
@sbrannen sbrannen added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 23, 2024
@dukbong dukbong deleted the beanName branch September 23, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants