Fixing NPE

This commit is contained in:
Joakim Erdfelt 2012-07-12 11:29:40 -07:00
parent b0549d8bf9
commit fc658c3805
1 changed files with 13 additions and 6 deletions

View File

@ -457,14 +457,21 @@ public class Parser
{ {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append("Parser["); builder.append("Parser[");
if (incomingFramesHandler == null)
{
builder.append("NO_HANDLER");
}
else
{
builder.append(incomingFramesHandler.getClass().getSimpleName()); builder.append(incomingFramesHandler.getClass().getSimpleName());
builder.append(", state="); }
builder.append(",s=");
builder.append(state); builder.append(state);
builder.append(", cursor="); builder.append(",c=");
builder.append(cursor); builder.append(cursor);
builder.append(", payloadLength="); builder.append(",len=");
builder.append(payloadLength); builder.append(payloadLength);
builder.append(", frame="); builder.append(",f=");
builder.append(frame); builder.append(frame);
builder.append("]"); builder.append("]");
return builder.toString(); return builder.toString();