bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/23819] New: javax.security.auth.Subject is broken


From: sgala at apache dot org
Subject: [Bug classpath/23819] New: javax.security.auth.Subject is broken
Date: 11 Sep 2005 08:27:44 -0000

The constructor takes a Collection "elements", and has a private LinkedList
"elements" too.

In the body of the constructor there is a fragment:
          if (!elements.contains (o))
            {
              elements.add (o);
            }

inside a loop on elements, which should be:

          if (!this.elements.contains (o))
            {
              this.elements.add (o);
            }

or it is not adding the elements in the principals list to the subject's
elements, which means a Subject constructed with a list of principals will
always have an empty response to getPrincipals.

In any case, I'd recommend renaming the parameter to avoid future confusion.

-- 
           Summary: javax.security.auth.Subject is broken
           Product: classpath
           Version: 0.18
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sgala at apache dot org
                CC: bug-classpath at gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23819




reply via email to

[Prev in Thread] Current Thread [Next in Thread]