ResolverImpl needs some work

Project:JNode Core

I was looking at the code trying to find the cause of an NPE, and discovered that the Resolver needs some more work:

  • The getByAddress method has a dummy implementation.
  • There is no support for a "hosts" file.
  • There is no synchronization of methods for adding / removing DNS servers.
  • The code is rather more convoluted than it ought to be (IMO).


... and more. I added some FIXMEs to the code.


Main reason for the missing support of the hosts file is the lack of consensus on where and how the system should be configured. More can be found at


I see.

From scanning through the comments on that page, it would seem that there are a lot of ideas about JNode configuration, but no actual progress on the issue for 3+ years. This is a really long time to be road-blocked.

While we all wait for a solution to the "big picture" config problem, consider that it would not be much work to add an interim "hosts" file for ResolverImpl.

BTW: I'm not saying we need to address the ResolverImpl issues immediately, or even soon.