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

Use enhanced-for cycle instead of Enumeration in sun.security

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P5
    • 20
    • None
    • security-libs

    Description

      java.util.Enumeration is a legacy interface from java 1.0.
      There are a few places with cycles which use it to iterate over collections. We can replace this manual cycle with enchanced-for, which is shorter and easier to read.

      sun.security.provider.JavaKeyStore#engineGetCertificateAlias
      sun.security.provider.JavaKeyStore#engineStore
      sun.security.provider.PolicyParser#write
      sun.security.provider.PolicyParser.GrantEntry#write
      sun.security.ssl.SSLSessionImpl#getValueNames
      sun.security.tools.keytool.Main#buildChain
      sun.security.x509.X509CRLEntryImpl#getExtensionValue
      sun.security.x509.X509CRLImpl#getExtensionValue

      Attachments

        Issue Links

          Activity

            People

              aturbanov Andrey Turbanov
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: