Menu

#20 StringIndexOutOfBoundsException: String index out of range:

open
nobody
Internals (9)
5
2008-08-26
2008-08-26
Anonymous
No

I'm receiving this exception:

[06:51:44,010,STDERR] Aug 26, 2008 6:51:44 AM com.itbs.aimcer.commune.msn.JmlMsnConnection$ConnectionListener exceptionCaught
INFO: MsnMessenger: piuka-m2@hotmail.comjava.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1768)
at net.sf.jml.message.p2p.MsnP2PInvitationMessage.messageReceived(MsnP2PInvitationMessage.java:41)
at net.sf.jml.message.IncomingMimeMessage.messageReceived(IncomingMimeMessage.java:56)
at net.sf.jml.protocol.MsnSession$1.messageReceived(MsnSession.java:105)
at net.sf.cindy.impl.AbstractSession$6.doRun(AbstractSession.java:341)
at net.sf.cindy.impl.AbstractSession$DispatchObject.run(AbstractSession.java:395)
at net.sf.cindy.impl.SimpleDispatcher.dispatch(SimpleDispatcher.java:35)
at net.sf.cindy.impl.AbstractSession.dispatch(AbstractSession.java:249)
at net.sf.cindy.impl.AbstractSession.dispatchMessageReceived(AbstractSession.java:335)
at net.sf.cindy.impl.StreamChannelSession.recognizeMessageAndDispatch(StreamChannelSession.java:77)
at net.sf.cindy.impl.StreamChannelSession.readFromChannel(StreamChannelSession.java:53)
at net.sf.cindy.impl.ChannelSession.onReadable(ChannelSession.java:212)
at net.sf.cindy.impl.ChannelSession.onEvent(ChannelSession.java:134)
at net.sf.cindy.impl.SocketSession.onEvent(SocketSession.java:119)
at net.sf.cindy.impl.SimpleEventGenerator.processKey(SimpleEventGenerator.java:212)
at net.sf.cindy.impl.SimpleEventGenerator.run(SimpleEventGenerator.java:192)
at net.sf.cindy.impl.SimpleEventGenerator.access$000(SimpleEventGenerator.java:54)
at net.sf.cindy.impl.SimpleEventGenerator$1.run(SimpleEventGenerator.java:115)

I think the problem is at MsnP2PInvitationMessage.java:41.

context = context.substring(0,context.length()-1);

Why the context is empty... I'm adding a "if (context.length() > 0)" to solve the issue.

Thanks,
Eric

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.