spring-projects / spring-security

Spring Security
http://spring.io/projects/spring-security
Apache License 2.0
8.84k stars 5.91k forks source link

Data flow style change from if-else to water flow. #16118

Closed mosbat closed 3 days ago

mosbat commented 4 days ago

Hi guys, I'd like to contribute even with small changes or improvements for practice or just to purely satisfy my coding habits.

I found an if else statement and after studying/observing it for a while, it felt a bit awkward (understandably); and would love to propose just a mere style change from if-else to waterfall style.

I do not expect you to like my changes; but if you'd like to discuss them or you have the same passion as I do, I'm happy to listen to comments and maybe hints.

I was thinking btw, the class is deprecated but still seems to be in use, or am I wrong?

mosbat commented 4 days ago

fixes #16119

sjohnr commented 3 days ago

@mosbat Thank you for wanting to contribute!

I'd like to contribute even with small changes or improvements for practice or just to purely satisfy my coding habits.

Changing code style to suit preference is something best done in your own projects or fork of Spring Security. I don't find precedent for accepting PRs that change code style simply due to preference. Please identify an actual issue with the code, and please consider opening an issue first to discuss it as outlined in the contributing guidelines (unless it is a trivial change that contains an obvious fix, such as a typo in documentation).

I do not expect you to like my changes; but if you'd like to discuss them or you have the same passion as I do, I'm happy to listen to comments and maybe hints.

This issue tracker is not a discussion forum, so I don't feel it would be productive to have these discussions here unless it is directly relevant to an issue.

For the above reasons, I am going to close this PR. Please consider looking at the ideal-for-contribution label as an alternative to try your hand at small issues/PRs.

sjohnr commented 3 days ago

Apologies I missed the issue you opened first. However, I will also close the issue as a duplicate.

mosbat commented 3 days ago

Apologies I missed the issue you opened first. However, I will also close the issue as a duplicate.

Thank you for the feedback. I understand that code style consistency is important, but I believe readability is also a crucial factor in maintainability, and I was hoping to get your thoughts on that aspect. I'll take another look at the project and see if I can identify any other issues that might be more in line with the project’s current goals.

I'm still familiarizing myself with the guidelines and process here, and I appreciate your time and guidance