You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The equals and hashCode methods of java.net.URL both may trigger a name service (usually DNS) lookup to resolve the host name or IP address. Depending on the configuration, and network status, that can take a long time. URI on the other hand makes no such calls and should be used instead unless the specific URL functionality is required.
In general it is better to use the URI class until access to the resource is actually needed, at which point you can just convert the URI to a URL using URI.toURL().
The text was updated successfully, but these errors were encountered:
ConfigurationBuilder
class usesHashSet
withjava.net.URL
which causes significant application slowdown.According to https://rules.sonarsource.com/java/RSPEC-2112
The
equals
andhashCode
methods ofjava.net.URL
both may trigger a name service (usually DNS) lookup to resolve the host name or IP address. Depending on the configuration, and network status, that can take a long time.URI
on the other hand makes no such calls and should be used instead unless the specificURL
functionality is required.In general it is better to use the URI class until access to the resource is actually needed, at which point you can just convert the
URI
to aURL
usingURI.toURL()
.The text was updated successfully, but these errors were encountered: