Caching bug in InetAddress.scala #2310
Labels
Comments
I advise anyone picking up this Issue to read the Java 8 InetAddress specification carefully.
Skipping lightly over the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Whilst chasing other issues, I noticed that the caching in
InetAddress.scala
is well intendedbut questionable:
Imagine using this in a long (weeks, months, years) duration server. The name associated
with the numeric address could change over that period. A trip to the bind server on each
call is more expensive, but significant work has been done over decades to make the
bind server cashing both correct & (relatively) low cost. IMO, the proper thing to do
here is to remove the caching (
if (host == null) {
and closing bracket) and defer cachingto the bind server.
Now is this the most important of bugs? No. But a good first issue for someone.
The text was updated successfully, but these errors were encountered: