summaryrefslogtreecommitdiffstats
path: root/test/com
diff options
context:
space:
mode:
authorGurmeen Bindra <gurmeen.bindra@isode.com>2015-08-21 13:33:46 (GMT)
committerGurmeen Bindra <gurmeen.bindra@isode.com>2015-08-21 13:44:58 (GMT)
commit277e11b13ea468697804aeb76a1431446c7d3944 (patch)
treea89844b828cdb7ca699d7f6cba0631e9a805f8f3 /test/com
parent73cb8ef5b98cf9b5026c4620a325ee799e6fcb8a (diff)
downloadstroke-277e11b13ea468697804aeb76a1431446c7d3944.zip
stroke-277e11b13ea468697804aeb76a1431446c7d3944.tar.bz2
Fix code to not throw StringPrepParseException that was part of ICU jar
The IDNConverter interface now throws java strandard IllegalArg exception instead of the ICU specific StringPrepParseException. Users of stroke that are not using ICU will now be able to use it without the icu jar. Test-information: Sanity tested by connecting to an XMPP server using an XMPP client Change-Id: I6999ae0c690b70bc748f131908a758a01dac20b9
Diffstat (limited to 'test/com')
-rw-r--r--test/com/isode/stroke/idn/IDNConverterTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/com/isode/stroke/idn/IDNConverterTest.java b/test/com/isode/stroke/idn/IDNConverterTest.java
index a17affc..eb82a61 100644
--- a/test/com/isode/stroke/idn/IDNConverterTest.java
+++ b/test/com/isode/stroke/idn/IDNConverterTest.java
@@ -38,7 +38,7 @@ public class IDNConverterTest {
try {
String result = testling.getStringPrepared("tronçon", IDNConverter.StringPrepProfile.NamePrep);
assertEquals("tronçon", result);
- } catch (StringPrepParseException e) {
+ } catch (IllegalArgumentException e) {
assertTrue("getStringPrep threw " + e, (e == null));
}
}
@@ -49,7 +49,7 @@ public class IDNConverterTest {
assertEquals("", testling.getStringPrepared("", IDNConverter.StringPrepProfile.NamePrep));
assertEquals("", testling.getStringPrepared("", IDNConverter.StringPrepProfile.XMPPNodePrep));
assertEquals("", testling.getStringPrepared("", IDNConverter.StringPrepProfile.XMPPResourcePrep));
- } catch (StringPrepParseException e) {
+ } catch (IllegalArgumentException e) {
assertTrue("getStringPrep threw " + e, (e == null));
}
}