diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-01-12 23:25:43 -0600 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-01-18 12:56:06 -0600 |
commit | 84e512223229b2d54e1a04b7899f888732c8fdba (patch) | |
tree | 33c022adbd60ce1103d0f0c97fcfc1e229a86643 /pki/base/util/src/netscape/security/acl/GroupImpl.java | |
parent | 2a535f04f7b7bf670b19b95801e25178af5c91f9 (diff) | |
download | pki-84e512223229b2d54e1a04b7899f888732c8fdba.tar.gz pki-84e512223229b2d54e1a04b7899f888732c8fdba.tar.xz pki-84e512223229b2d54e1a04b7899f888732c8fdba.zip |
Added generics (part 2).
This patch brings down the warnings from 4648 to 3992.
Ticket #2
Diffstat (limited to 'pki/base/util/src/netscape/security/acl/GroupImpl.java')
-rw-r--r-- | pki/base/util/src/netscape/security/acl/GroupImpl.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pki/base/util/src/netscape/security/acl/GroupImpl.java b/pki/base/util/src/netscape/security/acl/GroupImpl.java index fc50714f8..ed087a544 100644 --- a/pki/base/util/src/netscape/security/acl/GroupImpl.java +++ b/pki/base/util/src/netscape/security/acl/GroupImpl.java @@ -28,7 +28,7 @@ import java.util.Vector; * @author Satish Dharmaraj */ public class GroupImpl implements Group { - private Vector groupMembers = new Vector(50, 100); + private Vector<Principal> groupMembers = new Vector<Principal>(50, 100); private String group; /** @@ -73,7 +73,7 @@ public class GroupImpl implements Group { /** * returns the enumeration of the members in the group. */ - public Enumeration members() { + public Enumeration<Principal> members() { return groupMembers.elements(); } @@ -118,7 +118,7 @@ public class GroupImpl implements Group { if (groupMembers.contains(member)) { return true; } else { - Vector alreadySeen = new Vector(10); + Vector<Group> alreadySeen = new Vector<Group>(10); return isMemberRecurse(member, alreadySeen); } } @@ -136,11 +136,11 @@ public class GroupImpl implements Group { // a vector of already seen groups. Only new groups are considered, // thereby avoiding loops. // - boolean isMemberRecurse(Principal member, Vector alreadySeen) { - Enumeration e = members(); + boolean isMemberRecurse(Principal member, Vector<Group> alreadySeen) { + Enumeration<Principal> e = members(); while (e.hasMoreElements()) { boolean mem = false; - Principal p = (Principal) e.nextElement(); + Principal p = e.nextElement(); // if the member is in this collection, return true if (p.equals(member)) { |