The bug is fixed in PortletSessionImpl. Now you are save to run the testsuite ;)
Just to confirm something:
In the implementation of method 'getAttribute(String name, int scope)' of PortletSessionImpl,
if the passed-in scope argument is portlet scope, that method will check to see if an attribute
is stored under the current portlet scope. If not found, the method returns an attribute in
application scope, instead of null.
I checked the portlet spec, and the javadoc. The spec states that:
[quote]
The getAttribute method from the PortletSession interface is used to retrieve
attributes stored in the session.
[/quote]
The portlet-api javadoc for that method states that:
[quote]
Returns the object bound with the specified name in this session,
or null
if no object is bound under the name in the given scope.[/quote]
I updated that method, so that if no attribute is found under the current portlet
scope, it will not search in application scope, but simply return null.
I would like to make sure that behavior confirms with the spec.
Regards.
On 2/8/06, Craig Doremus <[EMAIL PROTECTED]> wrote:
Thank you, Zheng for resolving these issues. That is a BIG help!
I did a new build and all the tests pass with Test Portlet 1, but the "
Enumerate Session Attribute Names Test" in the 'Simple Attribute Test'
screen failed when I re-run the test using Test Portlet 2. Can you
confirm this?
TIA
/Craig
--
ZHENG Zhong
- http://heavyz.blogspot.com/
- http://people.apache.org/~zheng/
