diff options
author | Vitaly Takmazov | 2017-06-25 15:06:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-06-25 15:06:49 +0300 |
commit | 1e29c8830246a17f060654d43d970a00ce94122a (patch) | |
tree | 1f3374cc843f0b8016ea99e1acfa514f77a57544 /juick-xmpp/src/main/java/com/juick | |
parent | 13d3c5eebeef3442bba6f7934d8cae08e8962f70 (diff) |
commons-lang3 deprecated classes -> commons-text and commons-codec
Diffstat (limited to 'juick-xmpp/src/main/java/com/juick')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java | 2 | ||||
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java b/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java index 28dab1ef..ac33acc5 100644 --- a/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java +++ b/juick-xmpp/src/main/java/com/juick/components/configuration/XmppInitializer.java @@ -1,6 +1,6 @@ package com.juick.components.configuration; -import org.apache.commons.lang3.CharEncoding; +import org.apache.commons.codec.CharEncoding; import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java index 99df858e..a5d71be1 100644 --- a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java +++ b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java @@ -5,7 +5,7 @@ import com.juick.components.s2s.util.DialbackUtils; import com.juick.xmpp.extensions.StreamError; import com.juick.xmpp.extensions.StreamFeatures; import com.juick.xmpp.utils.XmlUtils; -import org.apache.commons.lang3.RandomStringUtils; +import org.apache.commons.text.RandomStringGenerator; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -32,11 +32,12 @@ public class ConnectionOut extends Connection implements Runnable { public String to; String checkSID = null; String dbKey = null; + RandomStringGenerator generator = new RandomStringGenerator.Builder().withinRange('a', 'z').build(); public ConnectionOut(XMPPServer xmpp, String hostname) throws CertificateException, UnrecoverableKeyException, NoSuchAlgorithmException, XmlPullParserException, KeyManagementException, KeyStoreException, IOException { super(xmpp); to = hostname; - dbKey = DialbackUtils.generateDialbackKey(RandomStringUtils.randomAscii(15), to, xmpp.HOSTNAME, streamID); + dbKey = DialbackUtils.generateDialbackKey(generator.generate(15), to, xmpp.HOSTNAME, streamID); } public ConnectionOut(XMPPServer xmpp, String hostname, String checkSID, String dbKey) throws Exception { |