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

Redundant permission checks when creating ClassLoaders

    XMLWordPrintable

Details

    Description

      The subclasses of ClassLoader (SecureClassLoader, URLClassLoader) perform a redundant "createClassLoader" permission check:

          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;
          }

      ClassLoader() already performs the check, so SecureClassLoader does 1 xtra check, and URLClassLoader does 2.

      Attachments

        Issue Links

          Activity

            People

              weijun Weijun Wang
              mullan Sean Mullan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: