Skip to content

Integer overflow in bean ordering causes inadvertent prioritization #2477

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

Closed
bgiddens opened this issue May 9, 2025 · 0 comments
Closed
Assignees
Labels
type: bug A general bug

Comments

@bgiddens
Copy link

bgiddens commented May 9, 2025

Error is here

The RepositoryRelProvider uses the order with Ordered.LOWEST_PRECEDENCE + 10, indicating lower then the intended lowest precedence. Since the lowest precedence is Integer.MAX_VALUE, this rolls back to a value near Integer.MIN_VALUE, causing this class to have extremely high precedence.

In all likelihood the intended behavior was low but not minimal ordering, i.e. Ordered.LOWEST_PRECEDENCE - 10.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 9, 2025
therepanic added a commit to therepanic/spring-data-rest that referenced this issue May 9, 2025
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 12, 2025
@mp911de mp911de self-assigned this May 12, 2025
@mp911de mp911de changed the title [Bug] Integer overflow in bean ordering causes inadvertent prioritization Integer overflow in bean ordering causes inadvertent prioritization May 12, 2025
mp911de added a commit that referenced this issue May 13, 2025
Add test.

See: #2477
Original pull request: #2478
mp911de pushed a commit that referenced this issue May 13, 2025
Signed-off-by: Andrey Litvitski <[email protected]>

Closes: #2477
Original pull request: #2478
mp911de added a commit that referenced this issue May 13, 2025
Add test.

See: #2477
Original pull request: #2478
mp911de pushed a commit that referenced this issue May 13, 2025
Signed-off-by: Andrey Litvitski <[email protected]>

Closes: #2477
Original pull request: #2478
mp911de added a commit that referenced this issue May 13, 2025
Add test.

See: #2477
Original pull request: #2478
@mp911de mp911de added this to the 4.3.12 (2024.0.12) milestone May 13, 2025
mp911de pushed a commit that referenced this issue May 13, 2025
Signed-off-by: Andrey Litvitski <[email protected]>

Closes: #2477
Original pull request: #2478
mp911de added a commit that referenced this issue May 13, 2025
Add test.

See: #2477
Original pull request: #2478
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants