diff options
Diffstat (limited to 'bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionsHash.java')
-rw-r--r-- | bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionsHash.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionsHash.java b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionsHash.java index b2dc8a861..667f23e01 100644 --- a/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionsHash.java +++ b/bundles/org.eclipse.osgi/core/framework/org/eclipse/osgi/internal/permadmin/PermissionsHash.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 IBM Corporation and others. + * Copyright (c) 2008, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,7 +35,7 @@ class PermissionsHash extends PermissionCollection { /** * A hashtable to store the elements of the collection. */ - Hashtable perms = new Hashtable(8); + Hashtable<Permission, Permission> perms = new Hashtable<Permission, Permission>(8); /** * Constructs a new instance of this class. @@ -68,7 +68,7 @@ class PermissionsHash extends PermissionCollection { * @return Enumeration * the permissions in the receiver. */ - public Enumeration elements() { + public Enumeration<Permission> elements() { return perms.keys(); } @@ -84,16 +84,16 @@ class PermissionsHash extends PermissionCollection { * the permission to check */ public boolean implies(Permission perm) { - Permission p = (Permission) perms.get(perm); + Permission p = perms.get(perm); if ((p != null) && p.implies(perm)) { return true; } - Enumeration permsEnum = elements(); + Enumeration<Permission> permsEnum = elements(); while (permsEnum.hasMoreElements()) { - if (((Permission) permsEnum.nextElement()).implies(perm)) { + if (permsEnum.nextElement().implies(perm)) { return true; } } |