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

Convert SystemDictionary::WKID to enum class

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • 17
    • 16
    • 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));
        }
      }



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

              Created:
              Updated:
              Resolved: