Changes - Replaced the hardcoded "GET" string comparison in the matchWebSocketUpgrade method with HttpMethod.GET.matches(request.getMethod()). - This change improves code readability and prevents potential errors caused by hardcoded strings. - It also aligns with Spring's convention for handling HTTP method matching, providing a more consistent approach. - Noticed that HttpMethod.GET.matches is used in other parts of the codebase, so this change also improves overall consistency.
Reason - Using constants from Spring's HttpMethod class enhances the maintainability of the code. - Avoiding hardcoded strings reduces the risk of typos and other potential errors. - Ensuring consistency across the codebase by using the same method for HTTP method matching where applicable.
Comment From: snicoll
@junhyeongkim2 thanks for the PR. We're a little puzzled by the amount of text for a one-liner change. We've noticed a number of such PRs in the recent past. Is this some sort of school assignment perhaps?
I am asking as we're a small team with limited time and we need to chose what we're working on wisely.
Comment From: junhyeongkim2
@snicoll Hello, thank you for your reply. This is not a school project, I'm contributing to open source personally because I have deep respect for the Spring Boot project. Due to my limited experience, I felt the need to over-explain, which made the content longer than necessary. I apologize for this. Moving forward, I'll focus on conveying only the key details to respect your team's time. I appreciate your patience and guidance.
Comment From: snicoll
@junhyeongkim2 thanks for following up and congratulations on making your first contribution to the Spring Framework.