src/share/classes/com/sun/rmi/rmid/ExecOptionPermission.java

Print this page

        

*** 221,239 **** private static class ExecOptionPermissionCollection extends PermissionCollection implements java.io.Serializable { ! private Hashtable permissions; private boolean all_allowed; // true if "*" is in the collection private static final long serialVersionUID = -1242475729790124375L; /** * Create an empty ExecOptionPermissionCollection. */ public ExecOptionPermissionCollection() { ! permissions = new Hashtable(11); all_allowed = false; } /** * Adds a permission to the collection. The key for the hash is --- 221,239 ---- private static class ExecOptionPermissionCollection extends PermissionCollection implements java.io.Serializable { ! private Hashtable<String, Permission> permissions; private boolean all_allowed; // true if "*" is in the collection private static final long serialVersionUID = -1242475729790124375L; /** * Create an empty ExecOptionPermissionCollection. */ public ExecOptionPermissionCollection() { ! permissions = new Hashtable<String, Permission>(11); all_allowed = false; } /** * Adds a permission to the collection. The key for the hash is
*** 289,299 **** // Check for full match first. Then work our way up the // name looking for matches on a.b.* String pname = p.getName(); ! Permission x = (Permission) permissions.get(pname); if (x != null) // we have a direct hit! return x.implies(permission); --- 289,299 ---- // Check for full match first. Then work our way up the // name looking for matches on a.b.* String pname = p.getName(); ! Permission x = permissions.get(pname); if (x != null) // we have a direct hit! return x.implies(permission);
*** 304,314 **** offset = pname.length() - 1; while ((last = pname.lastIndexOf(".", offset)) != -1) { pname = pname.substring(0, last+1) + "*"; ! x = (Permission) permissions.get(pname); if (x != null) { return x.implies(permission); } offset = last - 1; --- 304,314 ---- offset = pname.length() - 1; while ((last = pname.lastIndexOf(".", offset)) != -1) { pname = pname.substring(0, last+1) + "*"; ! x = permissions.get(pname); if (x != null) { return x.implies(permission); } offset = last - 1;
*** 319,329 **** offset = pname.length() - 1; while ((last = pname.lastIndexOf("=", offset)) != -1) { pname = pname.substring(0, last+1) + "*"; ! x = (Permission) permissions.get(pname); if (x != null) { return x.implies(permission); } offset = last - 1; --- 319,329 ---- offset = pname.length() - 1; while ((last = pname.lastIndexOf("=", offset)) != -1) { pname = pname.substring(0, last+1) + "*"; ! x = permissions.get(pname); if (x != null) { return x.implies(permission); } offset = last - 1;
*** 339,349 **** * container. * * @return an enumeration of all the ExecOptionPermission objects. */ ! public Enumeration elements() { return permissions.elements(); } } } --- 339,349 ---- * container. * * @return an enumeration of all the ExecOptionPermission objects. */ ! public Enumeration<Permission> elements() { return permissions.elements(); } } }