So what is this? Are we keeping two CVS repositories updated?
All anonymous SF CVS projects I'm updating work fine. No more problems using
anon CVS. Maybe moving to java.net was a bad idea after all?
Cheers,
Mathias
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 10:48 PM
Subject: [Opensymphony-cvsmail] webwork/src/main/webwork/action/factory
SessionMap.java,1.8,1.9
> Update of /cvsroot/opensymphony/webwork/src/main/webwork/action/factory
> In directory sc8-pr-cvs1:/tmp/cvs-serv9493/src/main/webwork/action/factory
>
> Modified Files:
> SessionMap.java
> Log Message:
> WW-239: making SessionMap synchronize access to the Session
>
> Index: SessionMap.java
> ===================================================================
> RCS file:
/cvsroot/opensymphony/webwork/src/main/webwork/action/factory/SessionMap.jav
a,v
> retrieving revision 1.8
> retrieving revision 1.9
> diff -u -d -r1.8 -r1.9
> --- SessionMap.java 12 Mar 2002 12:54:08 -0000 1.8
> +++ SessionMap.java 1 Aug 2003 20:47:57 -0000 1.9
> @@ -26,77 +26,88 @@
>
> public Set entrySet()
> {
> - if (entries == null)
> - {
> - entries = new HashSet();
> + synchronized (session) {
> + if (entries == null)
> + {
> + entries = new HashSet();
>
> - Enumeration enum = session.getAttributeNames();
> - while (enum.hasMoreElements())
> - {
> - final String key = enum.nextElement().toString();
> - final Object value = session.getAttribute(key);
> - entries.add(new Map.Entry()
> - {
> - public boolean equals(Object obj)
> - {
> - Map.Entry entry = (Map.Entry)obj;
> - return (key==null ?
> - entry.getKey()==null : key.equals(entry.getKey()))
&&
> - (value==null ?
> - entry.getValue()==null :
value.equals(entry.getValue()));
> - }
> + Enumeration enum = session.getAttributeNames();
> + while (enum.hasMoreElements())
> + {
> + final String key = enum.nextElement().toString();
> + final Object value = session.getAttribute(key);
> + entries.add(new Map.Entry()
> + {
> + public boolean equals(Object obj)
> + {
> + Map.Entry entry = (Map.Entry)obj;
> + return (key==null ?
> + entry.getKey()==null :
key.equals(entry.getKey())) &&
> + (value==null ?
> + entry.getValue()==null :
value.equals(entry.getValue()));
> + }
>
> - public int hashCode()
> - {
> - return (key==null ? 0 : key.hashCode()) ^
> - (value==null ? 0 : value.hashCode());
> - }
> + public int hashCode()
> + {
> + return (key==null ? 0 : key.hashCode()) ^
> + (value==null ? 0 : value.hashCode());
> + }
>
> - public Object getKey()
> - {
> - return key;
> - }
> + public Object getKey()
> + {
> + return key;
> + }
>
> - public Object getValue()
> - {
> - return value;
> - }
> + public Object getValue()
> + {
> + return value;
> + }
>
> - public Object setValue(Object obj)
> - {
> - session.setAttribute(key.toString(), obj);
> - return value;
> - }
> - });
> - }
> - }
> + public Object setValue(Object obj)
> + {
> + session.setAttribute(key.toString(), obj);
> + return value;
> + }
> + });
> + }
> + }
> + }
>
> - return entries;
> + return entries;
> }
>
> public Object put(Object key, Object value)
> {
> - entries = null;
> - session.setAttribute(key.toString(), value);
> - return get(key);
> + synchronized (session) {
> + entries = null;
> + session.setAttribute(key.toString(), value);
> + return get(key);
> + }
> }
>
> public Object get(Object key)
> {
> - return session.getAttribute(key.toString());
> + synchronized (session) {
> + return session.getAttribute(key.toString());
> + }
> }
>
> - public Object remove(Object key)
> - {
> - entries = null;
> - Object value = get(key);
> - session.removeAttribute(key.toString());
> - return value;
> - }
> + public Object remove(Object key) {
> + synchronized (session) {
> + entries = null;
> +
> + Object value = get(key);
> + session.removeAttribute(key.toString());
> +
> + return value;
> + }
> + }
>
> public void clear()
> {
> - entries = null;
> - session.invalidate();
> + synchronized (session) {
> + entries = null;
> + session.invalidate();
> + }
> }
> }
>
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> Opensymphony-cvsmail mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-cvsmail
>
>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork