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
I'm marking this issue for first-timers-only. That means that I will only accept a PR for this one from someone who's never contributed to open source before. This one is easy (but don't make that statement make you feel bad if you have a hard time with it, there's more to contributing to open source than changing lines of code, especially if it's your first time). I'll hold your hand through this if you need me to. :-)
Per the report above, the WindowsNetworkParams implementation should return the (unambiguous) Windows computer name rather than the result of InetAddress.getLocalHost().getHostName().
Here are the steps to get a PR merged here.
Read the CONTRIBUTING file for reference. I'll walk you through anything you don't understand.
Fork the project to your own GitHub account, make a local clone, and create a branch for your submission.
In the WindowsNetworkParams class, override the getHostName() method and return the value from Kernel32Util.getComputerName().
Optionally, override the Mac, Linux, Solaris, and BSD versions of the method to return the result from the respective platform's LibC class (eventually inheriting from JNA's LibCAPI) method getHostName().
Commit your changes, push to to your GitHub fork, and create a Pull Request
Respond to the usually minor comments on code review
changed the title On windows, in some case, new SystemInfo().getOperatingSystem().getNetworkParams().getHostName() return localhostOn windows, in some cases, NetworkParams.getHostName() return localhoston Oct 5, 2019
Activity
dbwiddis commentedon Oct 4, 2019
I'm marking this issue for first-timers-only. That means that I will only accept a PR for this one from someone who's never contributed to open source before. This one is easy (but don't make that statement make you feel bad if you have a hard time with it, there's more to contributing to open source than changing lines of code, especially if it's your first time). I'll hold your hand through this if you need me to. :-)
Per the report above, the
WindowsNetworkParams
implementation should return the (unambiguous) Windows computer name rather than the result ofInetAddress.getLocalHost().getHostName()
.Here are the steps to get a PR merged here.
WindowsNetworkParams
class, override thegetHostName()
method and return the value fromKernel32Util.getComputerName()
.LibC
class (eventually inheriting from JNA'sLibCAPI
) methodgetHostName()
.2kindsofcs commentedon Oct 5, 2019
I'd like to take this issue. thanks for kind, well-described comment.
dbwiddis commentedon Oct 5, 2019
It's yours! Let me know if you need any help.