<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 20: StringIndexOutOfBoundsException: String index out of range: </title><link href="https://sourceforge.net/p/java-jml/bugs/20/" rel="alternate"/><link href="https://sourceforge.net/p/java-jml/bugs/20/feed.atom" rel="self"/><id>https://sourceforge.net/p/java-jml/bugs/20/</id><updated>2008-08-26T23:52:07Z</updated><subtitle>Recent changes to 20: StringIndexOutOfBoundsException: String index out of range: </subtitle><entry><title>StringIndexOutOfBoundsException: String index out of range: </title><link href="https://sourceforge.net/p/java-jml/bugs/20/" rel="alternate"/><published>2008-08-26T23:52:07Z</published><updated>2008-08-26T23:52:07Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net08d23be546ec7866cd53506a192c8a74c572dc47</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm receiving this exception:&lt;/p&gt;
&lt;p&gt;[06:51:44,010,STDERR] Aug 26, 2008 6:51:44 AM com.itbs.aimcer.commune.msn.JmlMsnConnection$ConnectionListener exceptionCaught&lt;br /&gt;
INFO: MsnMessenger: piuka-m2@hotmail.comjava.lang.StringIndexOutOfBoundsException: String index out of range: -1&lt;br /&gt;
java.lang.StringIndexOutOfBoundsException: String index out of range: -1&lt;br /&gt;
at java.lang.String.substring(String.java:1768)&lt;br /&gt;
at net.sf.jml.message.p2p.MsnP2PInvitationMessage.messageReceived(MsnP2PInvitationMessage.java:41)&lt;br /&gt;
at net.sf.jml.message.IncomingMimeMessage.messageReceived(IncomingMimeMessage.java:56)&lt;br /&gt;
at net.sf.jml.protocol.MsnSession$1.messageReceived(MsnSession.java:105)&lt;br /&gt;
at net.sf.cindy.impl.AbstractSession$6.doRun(AbstractSession.java:341)&lt;br /&gt;
at net.sf.cindy.impl.AbstractSession$DispatchObject.run(AbstractSession.java:395)&lt;br /&gt;
at net.sf.cindy.impl.SimpleDispatcher.dispatch(SimpleDispatcher.java:35)&lt;br /&gt;
at net.sf.cindy.impl.AbstractSession.dispatch(AbstractSession.java:249)&lt;br /&gt;
at net.sf.cindy.impl.AbstractSession.dispatchMessageReceived(AbstractSession.java:335)&lt;br /&gt;
at net.sf.cindy.impl.StreamChannelSession.recognizeMessageAndDispatch(StreamChannelSession.java:77)&lt;br /&gt;
at net.sf.cindy.impl.StreamChannelSession.readFromChannel(StreamChannelSession.java:53)&lt;br /&gt;
at net.sf.cindy.impl.ChannelSession.onReadable(ChannelSession.java:212)&lt;br /&gt;
at net.sf.cindy.impl.ChannelSession.onEvent(ChannelSession.java:134)&lt;br /&gt;
at net.sf.cindy.impl.SocketSession.onEvent(SocketSession.java:119)&lt;br /&gt;
at net.sf.cindy.impl.SimpleEventGenerator.processKey(SimpleEventGenerator.java:212)&lt;br /&gt;
at net.sf.cindy.impl.SimpleEventGenerator.run(SimpleEventGenerator.java:192)&lt;br /&gt;
at net.sf.cindy.impl.SimpleEventGenerator.access$000(SimpleEventGenerator.java:54)&lt;br /&gt;
at net.sf.cindy.impl.SimpleEventGenerator$1.run(SimpleEventGenerator.java:115)&lt;/p&gt;
&lt;p&gt;I think the problem is at MsnP2PInvitationMessage.java:41.&lt;/p&gt;
&lt;p&gt;context = context.substring(0,context.length()-1);&lt;/p&gt;
&lt;p&gt;Why the context is empty... I'm adding a "if (context.length() &amp;gt; 0)" to solve the issue.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;
Eric&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>