Cool.
Can I submit this:
@SuppressWarnings("unchecked")
public Map getUserInfo( final PortletRequest request ) throws
PortletContainerException
{
final String remoteUser = request.getRemoteUser();
if( remoteUser != null )
{
final Map info = (Map)this.userInfoMap.get( remoteUser );
if( info == null )
{
return Collections.EMPTY_MAP;
}
return info;
}
return Collections.EMPTY_MAP;
}
I hope this is not too forward of me.
Keep up the good work!
Kind regards,
--
Marc
On 7/2/07, Elliot Metsger <[EMAIL PROTECTED]> wrote:
Good catch Marc,
Not enough sleep and too much coffee on my part. :-)
Fixed r552420, 552421.
Thanks!
Elliot
Marc Veary wrote:
> Hi All,
> Just got the HEAD from SVN and was checking over the changes as I try
> to keep this in sync with the code I am using. I noticed the
> following does not seem to be correct:
>
> public Map getUserInfo(PortletRequest request)
> throws PortletContainerException {
> if ( request.getRemoteUser() != null ) {
> Map info = (Map)userInfoMap.get(request.getRemoteUser());
> if ( info == null ) {
> return Collections.EMPTY_MAP;
> }
> }
> return new HashMap();
> }
>
> This ALWAYS returns an EMPTY MAP? Whereas the previous version
> returned the userInfoMap from the request. I think the attempt was to
> return an empty map if the 'info' was null?
>
> Kind regards,
> --
> Marc