Skip to main content

Please review fix for Issue 86 - UPDATED

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2004-12-13
Points: 0

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2009-03-13
Points: 0

Fix looks good for me. But there is one thing - as I understand this code will produce overflowed output in some cases - when the last write(...) invocation will overflow output.

String s = output.toString();
                        output = new StringBuffer(s.substring(0, overflowStart));

s.substring(0, overflowStart) is 1/3 of the maxOutputSize, s.substring(overflowEnd) is 2/3 of maxOutputSize and there is also OVERFLOW_MESSAGE that also has some length.