Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-38

Update JavaDoc for return type of SecurityUtils.getSubject()

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      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?)

      Attachments

        Activity

          People

            lhazlewood Les Hazlewood
            grzegorzborkowski Grzegorz Borkowski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: