/[classpath]/classpath/javax/security/auth/Subject.java
ViewVC logotype

Diff of /classpath/javax/security/auth/Subject.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.4 by gnu_andrew, Tue Aug 2 20:12:36 2005 UTC revision 1.2.2.5 by gnu_andrew, Tue Sep 20 18:46:30 2005 UTC
# Line 1  Line 1 
1  /* Subject.java -- a single entity in the system.  /* Subject.java -- a single entity in the system.
2     Copyright (C) 2004 Free Software Foundation, Inc.     Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3    
4  This file is part of GNU Classpath.  This file is part of GNU Classpath.
5    
# Line 385  public final class Subject implements Se Line 385  public final class Subject implements Se
385      // Constructors.      // Constructors.
386      // -----------------------------------------------------------------------      // -----------------------------------------------------------------------
387    
388      SecureSet (final Subject subject, final int type, final Collection elements)      SecureSet (final Subject subject, final int type, final Collection inElements)
389      {      {
390        this (subject, type);        this (subject, type);
391        for (Iterator it = elements.iterator(); it.hasNext(); )        for (Iterator it = inElements.iterator(); it.hasNext(); )
392          {          {
393            Object o = it.next();            Object o = it.next();
394            if (type == PRINCIPALS && !(o instanceof Principal))            if (type == PRINCIPALS && !(o instanceof Principal))
395              {              {
396                throw new IllegalArgumentException(o+" is not a Principal");                throw new IllegalArgumentException(o+" is not a Principal");
397              }              }
398            if (!elements.contains (o))            if (!this.elements.contains (o))
399              {              {
400                elements.add (o);                this.elements.add (o);
401              }              }
402          }          }
403      }      }
# Line 511  public final class Subject implements Se Line 511  public final class Subject implements Se
511    
512      public synchronized boolean contains (final Object element)      public synchronized boolean contains (final Object element)
513      {      {
514        return elements.remove (element);        return elements.contains (element);
515      }      }
516    
517      public boolean removeAll (final Collection c)      public boolean removeAll (final Collection c)

Legend:
Removed from v.1.2.2.4  
changed lines
  Added in v.1.2.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26