code: public static void addPermission(Permission perm, ClassLoader loader)
    {
      for (; loader != null; loader = loader.getParent()) {
        if (loader instanceof EnvironmentClassLoader) {
          EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader;
  
          envLoader.addPermission(perm);
        }
      }
    }
docs: Adds a permission to the current environment.
  
  @param perm the permission to add.
  
  @return the old attribute value