dion 2004/09/07 21:30:39 Modified: jelly/src/java/org/apache/commons/jelly/util NestedRuntimeException.java jelly/src/java/org/apache/commons/jelly/parser XMLParser.java Log: detab Revision Changes Path 1.4 +46 -46 jakarta-commons/jelly/src/java/org/apache/commons/jelly/util/NestedRuntimeException.java Index: NestedRuntimeException.java =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/util/NestedRuntimeException.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- NestedRuntimeException.java 24 Feb 2004 14:12:34 -0000 1.3 +++ NestedRuntimeException.java 8 Sep 2004 04:30:38 -0000 1.4 @@ -39,51 +39,51 @@ public class NestedRuntimeException extends RuntimeException { - /** - * Holds the reference to the exception or error that caused - * this exception to be thrown. - */ - private Throwable cause = null; - - /** - * Constructs a new <code>NestedRuntimeException</code> with specified - * nested <code>Throwable</code>. - * - * @param cause the exception or error that caused this exception to be - * thrown - */ - public NestedRuntimeException(Throwable cause) { - super(cause.getMessage()); - this.cause = cause; - } - - /** - * Constructs a new <code>NestedRuntimeException</code> with specified - * detail message and nested <code>Throwable</code>. - * - * @param msg the error message - * @param cause the exception or error that caused this exception to be - * thrown - */ - public NestedRuntimeException(String msg, Throwable cause) { - super(msg); - this.cause = cause; - } - - public Throwable getCause() { - return cause; - } - - public void printStackTrace() { - cause.printStackTrace(); - } - - public void printStackTrace(PrintStream out) { - cause.printStackTrace(out); - } - - public void printStackTrace(PrintWriter out) { - cause.printStackTrace(out); - } + /** + * Holds the reference to the exception or error that caused + * this exception to be thrown. + */ + private Throwable cause = null; + + /** + * Constructs a new <code>NestedRuntimeException</code> with specified + * nested <code>Throwable</code>. + * + * @param cause the exception or error that caused this exception to be + * thrown + */ + public NestedRuntimeException(Throwable cause) { + super(cause.getMessage()); + this.cause = cause; + } + + /** + * Constructs a new <code>NestedRuntimeException</code> with specified + * detail message and nested <code>Throwable</code>. + * + * @param msg the error message + * @param cause the exception or error that caused this exception to be + * thrown + */ + public NestedRuntimeException(String msg, Throwable cause) { + super(msg); + this.cause = cause; + } + + public Throwable getCause() { + return cause; + } + + public void printStackTrace() { + cause.printStackTrace(); + } + + public void printStackTrace(PrintStream out) { + cause.printStackTrace(out); + } + + public void printStackTrace(PrintWriter out) { + cause.printStackTrace(out); + } } 1.55 +31 -31 jakarta-commons/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java Index: XMLParser.java =================================================================== RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/parser/XMLParser.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- XMLParser.java 5 Sep 2004 14:25:51 -0000 1.54 +++ XMLParser.java 8 Sep 2004 04:30:38 -0000 1.55 @@ -679,19 +679,19 @@ public void endElement(String namespaceURI, String localName, String qName) throws SAXException { try { - tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); - if (tagScript != null) { - if (textBuffer.length() > 0) { - addTextScript(textBuffer.toString()); - textBuffer.setLength(0); - } - script = (ScriptBlock) scriptStack.pop(); - } - else { - textBuffer.append("</"); - textBuffer.append(qName); - textBuffer.append(">"); - } + tagScript = (TagScript) tagScriptStack.remove(tagScriptStack.size() - 1); + if (tagScript != null) { + if (textBuffer.length() > 0) { + addTextScript(textBuffer.toString()); + textBuffer.setLength(0); + } + script = (ScriptBlock) scriptStack.pop(); + } + else { + textBuffer.append("</"); + textBuffer.append(qName); + textBuffer.append(">"); + } // now lets set the parent tag variable if ( tagScriptStack.isEmpty() ) { @@ -1011,8 +1011,8 @@ if (taglib != null) { TagScript script = taglib.createTagScript(localName, list); if ( script != null ) { - configureTagScript(script); - + configureTagScript(script); + // clone the attributes to keep them around after this parse script.setSaxAttributes(new AttributesImpl(list)); @@ -1090,21 +1090,21 @@ } - /** - * Configure a newly created TagScript instance before any Expressions are created - * - * @param aTagScript - */ - protected void configureTagScript(TagScript aTagScript) { - // set parent relationship... - aTagScript.setParent(this.tagScript); - - // set the namespace Map - if ( elementNamespaces != null ) { - aTagScript.setTagNamespacesMap( elementNamespaces ); - elementNamespaces = null; - } - } + /** + * Configure a newly created TagScript instance before any Expressions are created + * + * @param aTagScript + */ + protected void configureTagScript(TagScript aTagScript) { + // set parent relationship... + aTagScript.setParent(this.tagScript); + + // set the namespace Map + if ( elementNamespaces != null ) { + aTagScript.setTagNamespacesMap( elementNamespaces ); + elementNamespaces = null; + } + } /** * Adds the text to the current script block parsing any embedded
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]