Don't create HttpSession when persisted property is null
--------------------------------------------------------
Key: TAPESTRY-2308
URL: https://issues.apache.org/jira/browse/TAPESTRY-2308
Project: Tapestry
Issue Type: Improvement
Components: tapestry-core
Affects Versions: 5.0.11
Reporter: Josh Canfield
Priority: Minor
When persisting properties using "session" it would be nice if the session was
only created after a non-null value was assigned to the property.
It should be enough to add a simple guard in
AbstractSessionPersistentFieldStrategy#postChange
Session session = _request.getSession(newValue != null);
if (session != null) {
session.setAttribute(builder.toString(), newValue);
}
allowing existing session values to be replaced if the session exists, but not
storing a value if no session exists.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]