DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9839>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9839 Printer disregards OutputFormat line separator string ------- Additional Comments From [EMAIL PROTECTED] 2002-06-13 18:55 ------- You need to fix the bounds check or you could get an exception when the line seperator crosses the buffer boundary. Something like: String lineSeparator = _format.getLineSeparator(); int lineSepLength = lineSeperator.length(); if ( _pos + lineSepLength > BufferSize ) { _writer.write( _buffer ); _pos = 0; } for ( int i = 0 ; i < lineSepLength ; i++ ) { _buffer[ _pos ] = lineSeparator.charAt(i); ++_pos; } All that leaves is the unlikely possibility that lineSepLength is greater than BufferSize, which would require either copying in parts or putting the bounds check inside of the loop. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
