Skip to content

Conversation

@HyeongDo-Myeong
Copy link
Contributor

The constructor 'URL(String)' has been deprecated since Java 20. Although this does not affect the current environment (Java 17), it will cause issues when upgrading to Java 21 or later. This commit updates the URL validation in FeignClientsRegistrar.getUrl by replacing new URL(url) with new URI(url), ensuring forward compatibility.

Additionally, tests were added to verify both valid and malformed URL scenarios:

Verified with Java 17 and the FeignClientsRegistrarTests.

…rning

The constructor 'URL(String)' has been deprecated since Java 20. Although this does not affect the current environment (Java 17), it will cause issues when upgrading to Java 21 or later.
This commit updates the URL validation in FeignClientsRegistrar.getUrl by replacing `new URL(url)` with `new URI(url)`, ensuring forward compatibility.
Verified with Java 17 and the FeignClientsRegistrarTests.

Signed-off-by: HyeongDo-Myeong <[email protected]>
@OlgaMaciaszek OlgaMaciaszek self-assigned this May 7, 2025
@OlgaMaciaszek OlgaMaciaszek moved this to In Progress in 2025.0.0 May 7, 2025
@OlgaMaciaszek OlgaMaciaszek added this to the 4.2.2 milestone May 7, 2025
Copy link
Collaborator

@OlgaMaciaszek OlgaMaciaszek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @HyeongDo-Myeong, thanks for submitting the PR. Looks good. Please update the date in the license comments on top of all the java classes you've changed to -2025. Also, please add the @author tag with your full name and surname to the javadocs of the classes you've modified.

Updated license headers to reflect year 2025 in all modified Java files.
Also added @author Javadoc tags with full name to classes modified in the previous commit as requested in PR review.

Signed-off-by: HyeongDo-Myeong <[email protected]>
@HyeongDo-Myeong
Copy link
Contributor Author

@OlgaMaciaszek Thank you for the review. I've updated the license headers to reflect 2025 and added the author tags as requested.

@OlgaMaciaszek OlgaMaciaszek merged commit ad9cc3b into spring-cloud:main May 8, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in 2025.0.0 May 8, 2025
@HyeongDo-Myeong HyeongDo-Myeong deleted the fix-url-validation branch May 8, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants