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

SecureClassLoader should not use CodeSource URLs as HashMap keys

XMLWordPrintable

    • b70
    • generic
    • generic
    • Verified

        SecureClassLoader.getProtectionDomain uses HashMap<CodeSource> to cache protection domains to speed up their construction. CodeSource.hashCode() uses URL.hashcode() and CodeSource.equals() uses URL.equals().
        However, these URL may cause DNS lookups which are expensive if everything is cached.

        We should avoid them, e.g. by using URI.

              mullan Sean Mullan
              igor Igor Nekrestyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: