haul 02/03/15 08:32:54
Modified: src/java/org/apache/cocoon/components/language/markup
CocoonMarkupLanguage.java
Log:
Patch from "Christoph Trompler" <[EMAIL PROTECTED]>
If newAtts is initialized with an empty atts attributes list,
then org.xml.sax.helpers.AttributesImpl has a known bug with
the next addAttribute call. The method hangs in an infinite loop.
See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D2975 or
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3D5159
This has been fixed in newer SAX releases, but crimson bundled
in JDK1.4 and xerces-j HEAD still contain the bug.
Revision Changes Path
1.4 +7 -2
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/CocoonMarkupLanguage.java
Index: CocoonMarkupLanguage.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/CocoonMarkupLanguage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CocoonMarkupLanguage.java 22 Feb 2002 07:00:08 -0000 1.3
+++ CocoonMarkupLanguage.java 15 Mar 2002 16:32:54 -0000 1.4
@@ -87,7 +87,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a>
- * @version CVS $Id: CocoonMarkupLanguage.java,v 1.3 2002/02/22 07:00:08 cziegeler
Exp $
+ * @version CVS $Id: CocoonMarkupLanguage.java,v 1.4 2002/03/15 16:32:54 haul Exp $
*/
public abstract class CocoonMarkupLanguage extends AbstractMarkupLanguage
{
@@ -270,7 +270,12 @@
String name = this.filename.substring(pos + 1);
String path = this.filename.substring(0,
pos).replace(File.separatorChar, '/');
// update the attributes
- AttributesImpl newAtts = new AttributesImpl(atts);
+ AttributesImpl newAtts;
+ if (atts == null || atts.getLength() == 0) {
+ newAtts = new AttributesImpl();
+ } else {
+ newAtts = new AttributesImpl(atts);
+ }
newAtts.addAttribute("", "file-name", "file-name", "CDATA", name);
newAtts.addAttribute("", "file-path", "file-path", "CDATA", path);
newAtts.addAttribute("", "creation-date", "creation-date", "CDATA",
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]