James,

I'm not sure what the problem is - you should probably look at the
source.

I also remembered this issue, which sounds similar:

  http://jira.opensymphony.com/secure/ViewIssue.jspa?key=WW-428

Cheers,
Scott

On Mon, Jan 26, 2004 at 09:25:44AM -0500, James Pan wrote:
> Hi,
> 
> In my actions, I sometimes test for certain conditions by checking to see if the 
> session object contains a particular key, such as
> 
> if (session.containsKey("myObject")) {
>       System.out.println("myObject is " + ( (Integer) session.get("myObject") 
> ).intValue() );
> }
> 
> I've run into various problems where session.containsKey("myObject") returns true, 
> but session.get("myObject") returns null.
> 
> Is this a bug? Am I doing something that's causing this?
> 
> Now, a simple remedy would be to replace
> 
> if (session.containsKey("myObject")) {}
> 
> with
> 
> if (session.get("myObject")==null) {}
> 
> but that's just not pretty.
> 
> Btw, in my particular case, session.containsKey("myObject") should return false, 
> because the user had let the session expire on the browser. I just don't understand 
> why it returns true...
> 
> Thank you,
> 
> James
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to