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

ConcurrentLruCache no longer supports capacity = 0 #31317

Closed
kcichonczyk opened this issue Sep 26, 2023 · 3 comments
Closed

ConcurrentLruCache no longer supports capacity = 0 #31317

kcichonczyk opened this issue Sep 26, 2023 · 3 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: regression A bug that is also a regression
Milestone

Comments

@kcichonczyk
Copy link

kcichonczyk commented Sep 26, 2023

ConcurrentLruCache no longer allows for capacity = 0 (previously sizeLimit) breaking backward compatibility. Moreover, according to the javadoc above public constructor, it should be possible to use capacity = 0. Please either change the javadoc or revert behaviour.

Assert.isTrue(capacity > 0, "Capacity must be > 0");

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 26, 2023
@sbrannen
Copy link
Member

This change was introduced in 6.0 in commit c470262.

Thanks for bringing this to our attention.

@sbrannen sbrannen added type: regression A bug that is also a regression in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 26, 2023
@sbrannen sbrannen added this to the 6.1.0-RC1 milestone Sep 26, 2023
@sbrannen sbrannen changed the title ConcurrentLruCache no longer allows for capacity = 0 ConcurrentLruCache no longer allows for capacity = 0 Sep 26, 2023
@sbrannen sbrannen changed the title ConcurrentLruCache no longer allows for capacity = 0 ConcurrentLruCache no longer supports capacity = 0 Sep 26, 2023
@jhoeller
Copy link
Contributor

Let's try to fix this in 6.0.13 if possible.

@jhoeller jhoeller modified the milestones: 6.1.0-RC1, 6.0.13 Sep 26, 2023
@kcichonczyk
Copy link
Author

kcichonczyk commented Sep 26, 2023

@sbrannen At first I created this PR, but then realised it's not a typo but changes around the logic. Sorry for confusion.

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) type: regression A bug that is also a regression
Projects
None yet
Development

No branches or pull requests

4 participants