cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/language/markup CocoonMarkupLanguage.java
Date Fri, 15 Mar 2002 16:32:54 GMT
haul        02/03/15 08:32:54

  Modified:    src/java/org/apache/cocoon/components/language/markup
                        CocoonMarkupLanguage.java
  Log:
  Patch from "Christoph Trompler" <trompler@informatik.tu-darmstadt.de>
  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:dims@yahoo.com">Davanum Srinivas</a>
    * @author <a href="mailto:ovidiu@cup.hp.com">Ovidiu Predescu</a>
    * @author <a href="mailto:vgritsenko@apache.org">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:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message