Skip to content

Add URLEqualsHashCodeRecipes to Java best practices#1058

Merged
timtebeek merged 1 commit intomainfrom
tim/url-equals-hashcode
Apr 12, 2026
Merged

Add URLEqualsHashCodeRecipes to Java best practices#1058
timtebeek merged 1 commit intomainfrom
tim/url-equals-hashcode

Conversation

@timtebeek
Copy link
Copy Markdown
Member

Summary

  • Add URLEqualsHashCodeRecipes to the bug prevention section of JavaBestPractices

java.net.URL.equals() and hashCode() perform DNS resolution, making them blocking, slow, and non-deterministic. This recipe replaces those calls with URI-based alternatives.

Test plan

  • JavaBestPracticesTest passes

@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Apr 12, 2026
@timtebeek timtebeek merged commit bc4a22c into main Apr 12, 2026
1 check failed
@timtebeek timtebeek deleted the tim/url-equals-hashcode branch April 12, 2026 14:37
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant