Convert SystemDictionary::WKID to enum class

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P4
    • 17
    • Affects Version/s: 16
    • Component/s: hotspot

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



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

              Created:
              Updated:
              Resolved: