src/share/classes/com/sun/jndi/url/dns/dnsURLContextFactory.java
Print this page
*** 60,70 ****
"dnsURLContextFactory.getObjectInstance: " +
"argument must be a DNS URL String or an array of them"));
}
}
! private static Object getUsingURL(String url, Hashtable env)
throws NamingException {
dnsURLContext urlCtx = new dnsURLContext(env);
try {
return urlCtx.lookup(url);
--- 60,70 ----
"dnsURLContextFactory.getObjectInstance: " +
"argument must be a DNS URL String or an array of them"));
}
}
! private static Object getUsingURL(String url, Hashtable<?,?> env)
throws NamingException {
dnsURLContext urlCtx = new dnsURLContext(env);
try {
return urlCtx.lookup(url);
*** 76,86 ****
/*
* Try each URL until lookup() succeeds for one of them.
* If all URLs fail, throw one of the exceptions arbitrarily.
* Not pretty, but potentially more informative than returning null.
*/
! private static Object getUsingURLs(String[] urls, Hashtable env)
throws NamingException {
if (urls.length == 0) {
throw (new ConfigurationException(
"dnsURLContextFactory: empty URL array"));
--- 76,86 ----
/*
* Try each URL until lookup() succeeds for one of them.
* If all URLs fail, throw one of the exceptions arbitrarily.
* Not pretty, but potentially more informative than returning null.
*/
! private static Object getUsingURLs(String[] urls, Hashtable<?,?> env)
throws NamingException {
if (urls.length == 0) {
throw (new ConfigurationException(
"dnsURLContextFactory: empty URL array"));