414431 Avoid debug NPE race

This commit is contained in:
Greg Wilkins 2013-09-05 12:24:28 +10:00
parent 3d6711b4ab
commit 236f5d57bf
1 changed files with 6 additions and 3 deletions

View File

@ -1079,11 +1079,14 @@ public class HttpGenerator extends AbstractGenerator
@Override
public String toString()
{
Buffer header=_header;
Buffer buffer=_buffer;
Buffer content=_content;
return String.format("%s{s=%d,h=%d,b=%d,c=%d}",
getClass().getSimpleName(),
_state,
_header == null ? -1 : _header.length(),
_buffer == null ? -1 : _buffer.length(),
_content == null ? -1 : _content.length());
header == null ? -1 : header.length(),
buffer == null ? -1 : buffer.length(),
content == null ? -1 : content.length());
}
}