Fixes StringIndexOutOfBoundsException when tab is pressed in the write

panel in the chat room window to search for contact and the pattern is
empty string. Patch provided by Danny van Heumen.
cusax-fix
hristoterezov 12 years ago
parent 122afab70e
commit 26a5703fb8

@ -615,6 +615,13 @@ else if(e.getKeyCode() == KeyEvent.VK_TAB)
String sequence = message.substring(position, index);
if (sequence.length() <= 0)
{
// Do not look for matching contacts if the matching pattern is
// 0 chars long, since all contacts will match.
return;
}
Iterator<ChatContact<?>> iter = chatPanel.getChatSession()
.getParticipants();
ArrayList<String> contacts = new ArrayList<String>();

Loading…
Cancel
Save