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

Missing toString for ExponentialBackOff #32061

Closed
klitoskyriacou opened this issue Jan 19, 2024 · 1 comment
Closed

Missing toString for ExponentialBackOff #32061

klitoskyriacou opened this issue Jan 19, 2024 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@klitoskyriacou
Copy link

Affects: 6.0.11 (possibly earlier) up to latest commit in main branch


The class ExponentialBackOff has its toString() method defined in the wrong place:

It is not defined for ExponentialBackOff itself, but for the inner class ExponentialBackOffExecution.

Thus, the following will print the hashCode instead of the nicely formatted output that was intended:

    System.out.println(new ExponentialBackoff(...))
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 19, 2024
@snicoll
Copy link
Member

snicoll commented Jan 19, 2024

instead of the nicely formatted output that was intended:

That's actually the right place, albeit perhaps the wrong prefix. You can't move that nice toString as it contains the interval and multiplier that are specific to the execution.

So there's a toString missing on ExponentialBackOff rather, and perhaps the existing toString should make it more clear it's about an execution.

@snicoll snicoll changed the title Wrong toString for ExponentialBackOff Missing toString for ExponentialBackOff Jan 19, 2024
@snicoll snicoll self-assigned this Jan 19, 2024
@snicoll snicoll added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 19, 2024
@snicoll snicoll added this to the 6.1.x milestone Jan 19, 2024
@jhoeller jhoeller added the in: core Issues in core modules (aop, beans, core, context, expression) label Jan 19, 2024
@snicoll snicoll modified the milestones: 6.1.x, 6.1.4 Jan 19, 2024
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: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants