[PATCH] Fixed the failing BadConfigExceptionTest unit test
Jason A. Donenfeld
Jason at zx2c4.com
Wed Jan 26 18:25:44 UTC 2022
On Tue, Jan 25, 2022 at 5:12 PM Michal Murin <michal.murin at jamf.com> wrote:
> Also removed the `getParsingClass()` condition from the `parseDnsServers()` method as the condition can be never met - the `InetAddresses.parse(dnsServer)` method always throws the `ParseException` with the `parsingClass` set to `InetAddress.class`.
Until one day it doesn't, and then we have to remember this subtle
behavior. On the contrary, what's there now means that the code is
correct regardless of changes.
> - if (e.getParsingClass() != InetAddress.class || !InetAddresses.isHostname(dnsServer))
> + if (!InetAddresses.isHostname(dnsServer))
Please drop this snippet from v2.
As Harsh said, we need your sign off line. It would also be
appreciated if you'd wrap your commit message and adjust your commit
subject to match what the project uses conventionally.
Thanks,
Jason
More information about the WireGuard
mailing list