Small fix.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1857 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-03-24 15:41:11 +00:00 committed by mtucker
parent e5586093f0
commit 7bc473fd24
1 changed files with 4 additions and 3 deletions

View File

@ -80,11 +80,12 @@ public class StringUtils {
return null;
}
int atIndex = JID.indexOf("@");
if (atIndex > 0) {
return JID.substring(0, atIndex);
if (atIndex < 0) {
return JID.substring(0);
}
else {
return JID.substring(0);
return JID.substring(0, atIndex);
}
}