mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +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:
parent
2241dae16a
commit
4121ec2c0e
1 changed files with 1 additions and 2 deletions
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue