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
1 changed files with 1 additions and 2 deletions

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";