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

Defer instantiation of Permission objects unless SecurityManager is used

    XMLWordPrintable

Details

    • generic
    • generic

    Description

      Permission check is only needed when there is a security manager.
      We can delay instantiating the Permission object for performing permission check until there is a security manager.

      The following are few examples.

      src/share/classes/java/util/logging/LogManager.java
      src/share/classes/java/util/prefs/Preferences.java
      src/solaris/classes/sun/net/www/protocol/jar/JarFileFactory.java
      src/windows/classes/sun/net/www/protocol/jar/JarFileFactory.java
      When a ProtectionDomain is being created, the permission collection will be set up even though no permission check will need to be performed if no security manager is installed.

      Initializing the permission collection can be deferred until permission check is needed.

      Attachments

        Issue Links

          Activity

            People

              mchung Mandy Chung
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: