@@ -158,13 +158,13 @@ private DnsProvider getProviderByType(DnsProviderType type) {
158158 }
159159
160160 /**
161- * Trims and rejects a DNS provider URL that resolves to an illegal address before any provider client
161+ * Rejects a DNS provider URL that resolves to an illegal address before any provider client
162162 * is given the chance to connect to it. See {@link UriUtils#validateUrl(String)} for the exact rules
163163 * enforced (including the requirement that the URL declares an {@code http}/{@code https} scheme).
164164 *
165165 * @throws InvalidParameterValueException if the URL is blank, fails validation
166166 */
167- private void validateDnsServerUrl (String trimmedUrl , Account caller ) {
167+ private void validateDnsServerUrl (String trimmedUrl ) {
168168 if (StringUtils .isBlank (trimmedUrl )) {
169169 throw new InvalidParameterValueException ("URL cannot be blank." );
170170 }
@@ -182,7 +182,7 @@ public DnsServer addDnsServer(AddDnsServerCmd cmd) {
182182 enforceRootAdminOnly (caller .getId ());
183183
184184 String dnsUrl = StringUtils .trim (cmd .getUrl ());
185- validateDnsServerUrl (dnsUrl , caller );
185+ validateDnsServerUrl (dnsUrl );
186186 DnsServer existing = dnsServerDao .findByUrlAndAccount (dnsUrl , caller .getId ());
187187 if (existing != null ) {
188188 throw new InvalidParameterValueException (
@@ -272,7 +272,7 @@ public DnsServer updateDnsServer(UpdateDnsServerCmd cmd) {
272272 if (StringUtils .isNotBlank (cmd .getUrl ())) {
273273 String dnsUrl = StringUtils .trim (cmd .getUrl ());
274274 if (!dnsUrl .equals (originalUrl )) {
275- validateDnsServerUrl (dnsUrl , caller );
275+ validateDnsServerUrl (dnsUrl );
276276 DnsServer duplicate = dnsServerDao .findByUrlAndAccount (dnsUrl , dnsServer .getAccountId ());
277277 if (duplicate != null && duplicate .getId () != dnsServer .getId ()) {
278278 throw new InvalidParameterValueException ("Another DNS server with this URL already exists." );
0 commit comments