1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 17:19:39 +02:00

Add org.jivesoftware.smack.Smack with getVersion() and ensureInitialized()

This commit is contained in:
Florian Schmaus 2020-11-08 22:27:57 +01:00
parent df96c57093
commit 1f5ada4822
11 changed files with 62 additions and 19 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2016 Florian Schmaus
* Copyright 2016-2020 Florian Schmaus
*
* This file is part of smack-repl.
*
@ -20,13 +20,13 @@
*/
package org.igniterealtime.smack.smackrepl;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.Smack;
import org.jivesoftware.smack.util.dns.javax.JavaxResolver;
public class SmackRepl {
public static void init() {
SmackConfiguration.getVersion();
Smack.ensureInitialized();
// smack-repl also pulls in smack-resolver-minidns which has higher precedence the smack-resolver-javax but
// won't work on Java SE platforms. Therefore explicitly setup JavaxResolver.
JavaxResolver.setup();