I didn't say it wouldn't work. I, and the Sun documentation I quoted, said it 
was a known bad programming practice.

Dave

Milan Milanovic wrote:
> Hi Dave,
> no, I think that this is not an issue. I tried with Boolean.TRUE and it is
> the same, but I earlier used new Boolean(true) and that worked.
> --
> Milan
> newton.dave wrote:
>> 
>> --- On Thu, 7/31/08, Milan Milanovic wrote:
>>> (getSession().put("variable", new Boolean(true));
>> 
>> Use Boolean.TRUE rather than instantiating a new object.
>> 
>> Note also that the Javadocs for Boolean state in big bold letters:
>> 
>> "Note: It is rarely appropriate to use this constructor. Unless a new
>> instance is required, the static factory valueOf(boolean) is generally a
>> better choice. It is likely to yield significantly better space and time
>> performance."
>> 
>> Dave
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> -- 
> View this message in context: 
> http://www.nabble.com/-S2--Testing-if-session-variable-is-present-tp18716278p18756698.html
> Sent from the Struts - User mailing list archive at Nabble.com.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to