bloritsch 01/10/25 13:34:54 Modified: src/org/apache/cocoon/xml/dom DOMBuilder.java Log: Optimize critical path And fix indentation Revision Changes Path 1.7 +10 -9 xml-cocoon2/src/org/apache/cocoon/xml/dom/DOMBuilder.java Index: DOMBuilder.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/xml/dom/DOMBuilder.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- DOMBuilder.java 2001/10/11 07:28:26 1.6 +++ DOMBuilder.java 2001/10/25 20:34:54 1.7 @@ -25,7 +25,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a> * (Apache Software Foundation, Exoffice Technologies) - * @version CVS $Revision: 1.6 $ $Date: 2001/10/11 07:28:26 $ + * @version CVS $Revision: 1.7 $ $Date: 2001/10/25 20:34:54 $ */ public class DOMBuilder implements XMLConsumer, Loggable { protected Logger log; @@ -562,14 +562,15 @@ if (this.locator==null) return(""); String pub=this.locator.getPublicId(); String sys=this.locator.getSystemId(); - pub=((pub==null) ? "" : ("Public ID=\""+pub+"\" ")); - sys=((sys==null) ? "" : ("System ID=\""+sys+"\" ")); - int l=this.locator.getLineNumber(); - int c=this.locator.getColumnNumber(); - String lin=((l<0) ? "" : ("line="+l+"")); - String col=((c<0) ? "" : (" col="+c+"")); - return new String(" ("+sys+pub+lin+col+" State: "+ - stateName[this.state]+")"); + pub = ( ( pub == null ) ? "" : new StringBuffer( "Public ID=\"" ).append( pub ).append( "\" " ).toString() ); + sys = ( ( sys == null ) ? "" : new StringBuffer( "System ID=\"" ).append( sys ).append( "\" " ).toString() ); + int l = this.locator.getLineNumber(); + int c = this.locator.getColumnNumber(); + String lin = ( ( l < 0 ) ? "" : new StringBuffer( "line=" ).append( l ).append( "" ).toString() ); + String col = ( ( c < 0 ) ? "" : new StringBuffer( " col=" ).append( c ).append( "" ).toString() ); + return new StringBuffer( " (" ).append( sys ).append( pub ) + .append( lin ).append( col ).append( " State: " ) + .append( stateName[this.state] + ")" ).toString(); } /**
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]