vgritsenko 02/04/21 11:59:38
Modified: src/scratchpad/src/org/apache/cocoon/transformation
XMLFormTransformer.java
Log:
Fix deadlock (known bug in AttributesImpl)
Revision Changes Path
1.4 +12 -2
xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLFormTransformer.java
Index: XMLFormTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/XMLFormTransformer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XMLFormTransformer.java 21 Apr 2002 18:32:34 -0000 1.3
+++ XMLFormTransformer.java 21 Apr 2002 18:59:38 -0000 1.4
@@ -268,7 +268,12 @@
if (isRootElement_)
{
- AttributesImpl atts = new AttributesImpl( attributes );
+ AttributesImpl atts;
+ if (attributes == null || attributes.getLength() == 0) {
+ atts = new AttributesImpl();
+ } else {
+ atts = new AttributesImpl(attributes);
+ }
atts.addAttribute( NS, NS_PREFIX, XMLNS_PREFIX + ":" + NS_PREFIX, "CDATA",
NS);
attributes = atts;
isRootElement_ = false;
@@ -390,7 +395,12 @@
// render <violation> tag
// set the ref attribute
- AttributesImpl atts = new AttributesImpl( attributes );
+ AttributesImpl atts;
+ if (attributes == null || attributes.getLength() == 0) {
+ atts = new AttributesImpl();
+ } else {
+ atts = new AttributesImpl(attributes);
+ }
// atts.addAttribute( NS, TAG_COMMON_ATTR_REF, NS_PREFIX + ":" +
TAG_COMMON_ATTR_REF, "CDATA", violation.getPath());
atts.addAttribute( null, TAG_COMMON_ATTR_REF, TAG_COMMON_ATTR_REF,
"CDATA", violation.getPath());
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]