mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 06:12:05 +01:00
Revert "Do not set com.sun.jndi.dns.DnsContextFactory in JavaxResolver"
This reverts commit ac9641f091
.
Reverted because now an NoInitialContextException is now thrown.
Related to SMACK-856.
This commit is contained in:
parent
456d645e27
commit
78ee22c261
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2013-2019 Florian Schmaus
|
||||
* Copyright 2013-2018 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -18,6 +18,7 @@ package org.jivesoftware.smack.util.dns.javax;
|
|||
|
||||
import java.net.InetAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
@ -51,7 +52,9 @@ public class JavaxResolver extends DNSResolver implements SmackInitializer {
|
|||
|
||||
static {
|
||||
try {
|
||||
dirContext = new InitialDirContext();
|
||||
Hashtable<String, String> env = new Hashtable<>();
|
||||
env.put("java.naming.factory.initial", "com.sun.jndi.dns.DnsContextFactory");
|
||||
dirContext = new InitialDirContext(env);
|
||||
} catch (NamingException e) {
|
||||
LOGGER.log(Level.SEVERE, "Could not construct InitialDirContext", e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue