We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
URLEqualsHashCode
1 parent d3fc5f3 commit 7f90df7Copy full SHA for 7f90df7
docs/bugpattern/URLEqualsHashCode.md
@@ -1,2 +1,7 @@
1
-Equals and HashCode method of java.net.URL make blocking network calls. Either
2
-use java.net.URI or if that isn't possible, use Collection<URL> or List<URL>.
+The `equals` and `hashCode` methods of `java.net.URL` make blocking network
+calls. When you place a `URL` into a hash-based container, the container invokes
3
+those methods.
4
+
5
+Prefer `java.net.URI`. Or, if you must use `URL` in a
6
+collection, prefer to use a non-hash-based container like a `List<URL>`, and
7
+avoid calling methods like `contains` (which calls `equals`) on it.
0 commit comments