shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Borkowski (JIRA)" <>
Subject [jira] Commented: (JSEC-20) Update JavaDoc for return type of SecurityUtils.getSubject()
Date Fri, 17 Oct 2008 13:33:44 GMT


Grzegorz Borkowski commented on JSEC-20:

>From what I see now in SecurityUtils code, I see that this method will return null if
no SecurityManager or Subject is registered in ThreadContext or as  VM-singleton SecurityManager
- so probably this information should be put in javadoc.

> Update JavaDoc for return type of SecurityUtils.getSubject()
> ------------------------------------------------------------
>                 Key: JSEC-20
>                 URL:
>             Project: JSecurity
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Grzegorz Borkowski
>            Priority: Trivial
> From JavaDoc for  SecurityUtils.getSubject() it is not clear what returns this method
if nobody is logged in. Does it return null? or some default Subject? From Subject class documentation
(getPrincipal method) I would expect that SecurityUtils.getSubject() returns some default
Subject, but simple tests shows that it is not true - it returns null.
> So I would change it like this:
> @return the currently accessible <tt>Subject</tt> accessible to the calling
code or null if .... (actually when?)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message