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

Convert SystemDictionary::WKID to enum class

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • 17
    • 16
    • hotspot

    Description

      Convert SystemDictionary::WKID to enum class to provide better type safety. Also implement proper enumerators for this type of enums to avoid code like this (which might get out of bounds if you're not careful):

      void SystemDictionary::well_known_klasses_do(MetaspaceClosure* it) {
        for (int id = FIRST_WKID; id < WKID_LIMIT; id++) {
          it->push(well_known_klass_addr((WKID)id));
        }
      }



      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: