Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6899533

SecureClassLoader and URLClassLoader have unnecessary check for createClassLoader permission

    XMLWordPrintable

Details

    • b11
    • generic
    • generic
    • Not verified

    Description

      SecurityClassLoader and URLClassLoader have unnecessary security checks.

      protected SecureClassLoader() {
          super();
          // this is to make the stack depth consistent with 1.1
          SecurityManager security = System.getSecurityManager();
          if (security != null) {
              security.checkCreateClassLoader();
          }
          initialized = true;
      }

      1.1 security managers are no longer supported (see JDK-8186535). The permission check is done by the super class, ClassLoader. The initialized flag and associated code can also be removed -- this was only necessary before JDK 6 (see JSCG 4-5 for more info).

      Attachments

        Issue Links

          Activity

            People

              mullan Sean Mullan
              hawtin Tom Hawtin (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: