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: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]