1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

Use String(String,String) constructor in SmackConfiguration

String(String, Charset) is not available on all platforms, as it's only
provided by Android on API level 9 or higher.
This commit is contained in:
Florian Schmaus 2014-02-22 14:41:19 +01:00
parent 2241dae16a
commit 4121ec2c0e

View file

@ -19,7 +19,6 @@ package org.jivesoftware.smack;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@ -73,7 +72,7 @@ public final class SmackConfiguration {
InputStream is = FileUtils.getStreamForUrl("classpath:org.jivesoftware.smack/version", null);
byte[] buf = new byte[1024];
is.read(buf);
smackVersion = new String(buf, Charset.forName("UTF-8"));
smackVersion = new String(buf, "UTF-8");
} catch(Exception e) {
log.log(Level.SEVERE, "Could not determine Smack version", e);
smackVersion = "unkown";