From 4121ec2c0ea1e5627f2750d8340786a9f2caee3b Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 22 Feb 2014 14:41:19 +0100 Subject: [PATCH] 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. --- .../main/java/org/jivesoftware/smack/SmackConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java b/core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java index c02ca4189..bb6dd2448 100644 --- a/core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java +++ b/core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java @@ -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";