code: protected PermissionCollection getPermissions(CodeSource codeSource) {
  
          String codeUrl = codeSource.getLocation().toString();
          PermissionCollection pc;
          if ((pc = (PermissionCollection)loaderPC.get(codeUrl)) == null) {
              pc = super.getPermissions(codeSource);
              if (pc != null) {
                  Iterator perms = permissionList.iterator();
                  while (perms.hasNext()) {
                      Permission p = (Permission)perms.next();
                      pc.add(p);
                  }
                  loaderPC.put(codeUrl,pc);
              }
          }
          return (pc);
  
      }
docs: Get the Permissions for a CodeSource.  If this instance
  of WebappClassLoader is for a web application context,
  add read FilePermission or JndiPermissions for the base
  directory (if unpacked),
  the context URL, and jar file resources.
  
  @param codeSource where the code was loaded from
  @return PermissionCollection for CodeSource