Yair Zaslavsky has posted comments on this change. Change subject: backend: getLdapServers() use getCanonicalHostName ......................................................................
Patch Set 2: (3 comments) .................................................... File backend/manager/tools/src/main/java/org/ovirt/engine/core/domains/ManageDomains.java Line 482: result.add(ldapDnsResult.getAddresses()[counter]); Line 483: } Line 484: return result; Line 485: } else { Line 486: for (String host: argValue.split(DOMAIN_SEPERATOR)) { Did you check here what happens if you don't pass ldapServers parameter to cmd line? Do you get an empty string, or null? Line 487: try { Line 488: InetAddress ia = InetAddress.getByName(host); Line 489: ia.getCanonicalHostName(); Line 490: } catch (UnknownHostException e) { Line 485: } else { Line 486: for (String host: argValue.split(DOMAIN_SEPERATOR)) { Line 487: try { Line 488: InetAddress ia = InetAddress.getByName(host); Line 489: ia.getCanonicalHostName(); is "getCanonicalHostName" still needed? Please check javadoc for getByName, and see if it's enough - I have a feeling it's enough. Line 490: } catch (UnknownHostException e) { Line 491: log.error("Cannot resolve FQDN: " + e.getMessage()); Line 492: } Line 493: } Line 487: try { Line 488: InetAddress ia = InetAddress.getByName(host); Line 489: ia.getCanonicalHostName(); Line 490: } catch (UnknownHostException e) { Line 491: log.error("Cannot resolve FQDN: " + e.getMessage()); Hi, logging as error is fine, but maybe also worth printing to the console. Using System.out.prinltln What do you think? Line 492: } Line 493: } Line 494: } Line 495: return new ArrayList<String>(Arrays.asList(argValue.split(DOMAIN_SEPERATOR))); -- To view, visit http://gerrit.ovirt.org/19547 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibae81ccd6b2a402c856934839f1dbdad316bbc3d Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Douglas Schilling Landgraf <dougsl...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches