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 Summary: Printer disregards OutputFormat line separator string Product: Xerces2-J Version: 2.0.1 Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Serialization AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] org.apache.xml.serialize.Printer disregards org.apache.xml.serialize.OutputFormat lineSeparator String when in breakLine method. Original breakLine method: public void breakLine() throws IOException { try { if ( _pos == BufferSize ) { _writer.write( _buffer ); _pos = 0; } _buffer[ _pos ] = '\n'; //************* BUG ************/ ++_pos; } catch ( IOException except ) { // We don't throw an exception, but hold it // until the end of the document. if ( _exception == null ) _exception = except; throw except; } } Fix: public void breakLine() throws IOException { try { if ( _pos == BufferSize ) { _writer.write( _buffer ); _pos = 0; } // My patch mgertsvo *********************************************** String lineSeparator = _format.getLineSeparator(); for ( int i = 0 ; i < lineSeparator.length() ; i++ ) { _buffer[ _pos ] = _format.getLineSeparator().charAt(i); ++_pos; } // My patch end mgertsvo ******************************************* } catch ( IOException except ) { // We don't throw an exception, but hold it // until the end of the document. if ( _exception == null ) _exception = except; throw except; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
