You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2002/09/06 04:49:08 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon Cocoon.java
vgritsenko 2002/09/05 19:49:08
Modified: src/java/org/apache/cocoon Cocoon.java
Log:
Fix bug #12139: Session can be modified while still
being enumerated
Revision Changes Path
1.34 +11 -8 xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java
Index: Cocoon.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- Cocoon.java 31 Jul 2002 13:13:21 -0000 1.33
+++ Cocoon.java 6 Sep 2002 02:49:08 -0000 1.34
@@ -546,13 +546,16 @@
// log all of the session attributes
if (session != null) {
- e = session.getAttributeNames();
-
- while (e.hasMoreElements()) {
- String p = (String) e.nextElement();
-
- msg.append("PARAM: '").append(p).append("' ")
- .append("VALUE: '").append(session.getAttribute(p)).append("'").append(lineSeparator);
+ // Fix bug #12139: Session can be modified while still
+ // being enumerated here
+ synchronized (session) {
+ e = session.getAttributeNames();
+ while (e.hasMoreElements()) {
+ String p = (String) e.nextElement();
+ msg.append("PARAM: '").append(p).append("' ")
+ .append("VALUE: '").append(session.getAttribute(p)).append("'")
+ .append(lineSeparator);
+ }
}
}
----------------------------------------------------------------------
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