8253155: Minor cleanups and Javadoc fixes for LdapDnsProvider of java.naming
Reviewed-by: dfuchs, aefimov, alanb, vtewari
This commit is contained in:
parent
d219d8b987
commit
b5620a36f4
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -25,14 +25,14 @@
|
||||
|
||||
package com.sun.jndi.ldap;
|
||||
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.ldap.spi.LdapDnsProvider;
|
||||
import javax.naming.ldap.spi.LdapDnsProviderResult;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.naming.NamingException;
|
||||
import javax.naming.ldap.spi.LdapDnsProviderResult;
|
||||
|
||||
public class DefaultLdapDnsProvider {
|
||||
|
||||
public Optional<LdapDnsProviderResult> lookupEndpoints(String url,
|
||||
@ -82,5 +82,4 @@ public class DefaultLdapDnsProvider {
|
||||
return Optional.of(res);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -87,7 +87,7 @@ final class LdapDnsProviderService {
|
||||
* subclasses of {@code LdapDnsProvider} then this method will fall back
|
||||
* to the {@code DefaultLdapDnsProvider}.
|
||||
*
|
||||
* @throws NamingException if the {@code url} in not valid or an error
|
||||
* @throws NamingException if the {@code url} is not valid or an error
|
||||
* occurred while performing the lookup.
|
||||
*/
|
||||
LdapDnsProviderResult lookupEndpoints(String url, Hashtable<?,?> env)
|
||||
@ -110,5 +110,4 @@ final class LdapDnsProviderService {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -105,5 +105,4 @@ public abstract class LdapDnsProvider {
|
||||
*/
|
||||
public abstract Optional<LdapDnsProviderResult> lookupEndpoints(
|
||||
String url, Map<?,?> env) throws NamingException;
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -32,7 +32,7 @@ import java.util.List;
|
||||
*
|
||||
* <p> This class is used by an {@link LdapDnsProvider} to return the result
|
||||
* of a DNS lookup for a given LDAP URL. The result consists of a domain name
|
||||
* and its associated ldap server endpoints.
|
||||
* and its associated LDAP server endpoints.
|
||||
*
|
||||
* <p> A {@code null} {@code domainName} is equivalent to and represented
|
||||
* by an empty string.
|
||||
@ -46,10 +46,10 @@ public final class LdapDnsProviderResult {
|
||||
|
||||
/**
|
||||
* Construct an LdapDnsProviderResult consisting of a resolved domain name
|
||||
* and the ldap server endpoints that serve the domain.
|
||||
* and the LDAP server endpoints that serve the domain.
|
||||
*
|
||||
* @param domainName the resolved domain name; can be null.
|
||||
* @param endpoints the possibly empty list of resolved ldap server
|
||||
* @param endpoints the possibly empty list of resolved LDAP server
|
||||
* endpoints
|
||||
*
|
||||
* @throws NullPointerException if {@code endpoints} contains {@code null}
|
||||
@ -63,7 +63,7 @@ public final class LdapDnsProviderResult {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the domain name resolved from the ldap URL. This method returns
|
||||
* Returns the domain name resolved from the LDAP URL. This method returns
|
||||
* the empty string if the {@code LdapDnsProviderResult} is created with a
|
||||
* null domain name.
|
||||
*
|
||||
@ -75,13 +75,12 @@ public final class LdapDnsProviderResult {
|
||||
|
||||
/**
|
||||
* Returns the possibly empty list of individual server endpoints resolved
|
||||
* from the ldap URL.
|
||||
* from the LDAP URL.
|
||||
*
|
||||
* @return a possibly empty unmodifiable {@link List} containing the
|
||||
* resolved ldap server endpoints
|
||||
* resolved LDAP server endpoints
|
||||
*/
|
||||
public List<String> getEndpoints() {
|
||||
return endpoints;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user